Merge branch 'testing' of github.com:ceph/ceph-client into v3.8-rc5-testing
This commit is contained in:
@@ -14,13 +14,19 @@
|
||||
#define CEPH_FEATURE_DIRLAYOUTHASH (1<<7)
|
||||
/* bits 8-17 defined by user-space; not supported yet here */
|
||||
#define CEPH_FEATURE_CRUSH_TUNABLES (1<<18)
|
||||
/* bits 19-24 defined by user-space; not supported yet here */
|
||||
#define CEPH_FEATURE_CRUSH_TUNABLES2 (1<<25)
|
||||
/* bit 26 defined by user-space; not supported yet here */
|
||||
#define CEPH_FEATURE_REPLY_CREATE_INODE (1<<27)
|
||||
|
||||
/*
|
||||
* Features supported.
|
||||
*/
|
||||
#define CEPH_FEATURES_SUPPORTED_DEFAULT \
|
||||
(CEPH_FEATURE_NOSRCADDR | \
|
||||
CEPH_FEATURE_CRUSH_TUNABLES)
|
||||
CEPH_FEATURE_CRUSH_TUNABLES | \
|
||||
CEPH_FEATURE_CRUSH_TUNABLES2 | \
|
||||
CEPH_FEATURE_REPLY_CREATE_INODE)
|
||||
|
||||
#define CEPH_FEATURES_REQUIRED_DEFAULT \
|
||||
(CEPH_FEATURE_NOSRCADDR)
|
||||
|
||||
+17
-12
@@ -52,10 +52,10 @@ static inline int ceph_has_room(void **p, void *end, size_t n)
|
||||
return end >= *p && n <= end - *p;
|
||||
}
|
||||
|
||||
#define ceph_decode_need(p, end, n, bad) \
|
||||
do { \
|
||||
if (!likely(ceph_has_room(p, end, n))) \
|
||||
goto bad; \
|
||||
#define ceph_decode_need(p, end, n, bad) \
|
||||
do { \
|
||||
if (!likely(ceph_has_room(p, end, n))) \
|
||||
goto bad; \
|
||||
} while (0)
|
||||
|
||||
#define ceph_decode_64_safe(p, end, v, bad) \
|
||||
@@ -99,8 +99,8 @@ static inline int ceph_has_room(void **p, void *end, size_t n)
|
||||
*
|
||||
* There are two possible failures:
|
||||
* - converting the string would require accessing memory at or
|
||||
* beyond the "end" pointer provided (-E
|
||||
* - memory could not be allocated for the result
|
||||
* beyond the "end" pointer provided (-ERANGE)
|
||||
* - memory could not be allocated for the result (-ENOMEM)
|
||||
*/
|
||||
static inline char *ceph_extract_encoded_string(void **p, void *end,
|
||||
size_t *lenp, gfp_t gfp)
|
||||
@@ -217,10 +217,10 @@ static inline void ceph_encode_string(void **p, void *end,
|
||||
*p += len;
|
||||
}
|
||||
|
||||
#define ceph_encode_need(p, end, n, bad) \
|
||||
do { \
|
||||
if (!likely(ceph_has_room(p, end, n))) \
|
||||
goto bad; \
|
||||
#define ceph_encode_need(p, end, n, bad) \
|
||||
do { \
|
||||
if (!likely(ceph_has_room(p, end, n))) \
|
||||
goto bad; \
|
||||
} while (0)
|
||||
|
||||
#define ceph_encode_64_safe(p, end, v, bad) \
|
||||
@@ -231,12 +231,17 @@ static inline void ceph_encode_string(void **p, void *end,
|
||||
#define ceph_encode_32_safe(p, end, v, bad) \
|
||||
do { \
|
||||
ceph_encode_need(p, end, sizeof(u32), bad); \
|
||||
ceph_encode_32(p, v); \
|
||||
ceph_encode_32(p, v); \
|
||||
} while (0)
|
||||
#define ceph_encode_16_safe(p, end, v, bad) \
|
||||
do { \
|
||||
ceph_encode_need(p, end, sizeof(u16), bad); \
|
||||
ceph_encode_16(p, v); \
|
||||
ceph_encode_16(p, v); \
|
||||
} while (0)
|
||||
#define ceph_encode_8_safe(p, end, v, bad) \
|
||||
do { \
|
||||
ceph_encode_need(p, end, sizeof(u8), bad); \
|
||||
ceph_encode_8(p, v); \
|
||||
} while (0)
|
||||
|
||||
#define ceph_encode_copy_safe(p, end, pv, n, bad) \
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/ceph/osdmap.h>
|
||||
#include <linux/ceph/messenger.h>
|
||||
#include <linux/ceph/auth.h>
|
||||
#include <linux/ceph/pagelist.h>
|
||||
|
||||
/*
|
||||
* Maximum object name size
|
||||
@@ -22,7 +23,6 @@ struct ceph_snap_context;
|
||||
struct ceph_osd_request;
|
||||
struct ceph_osd_client;
|
||||
struct ceph_authorizer;
|
||||
struct ceph_pagelist;
|
||||
|
||||
/*
|
||||
* completion callback for async writepages
|
||||
@@ -95,7 +95,7 @@ struct ceph_osd_request {
|
||||
struct bio *r_bio; /* instead of pages */
|
||||
#endif
|
||||
|
||||
struct ceph_pagelist *r_trail; /* trailing part of the data */
|
||||
struct ceph_pagelist r_trail; /* trailing part of the data */
|
||||
};
|
||||
|
||||
struct ceph_osd_event {
|
||||
@@ -157,7 +157,6 @@ struct ceph_osd_client {
|
||||
|
||||
struct ceph_osd_req_op {
|
||||
u16 op; /* CEPH_OSD_OP_* */
|
||||
u32 flags; /* CEPH_OSD_FLAG_* */
|
||||
union {
|
||||
struct {
|
||||
u64 offset, length;
|
||||
@@ -207,29 +206,24 @@ extern void ceph_osdc_handle_reply(struct ceph_osd_client *osdc,
|
||||
extern void ceph_osdc_handle_map(struct ceph_osd_client *osdc,
|
||||
struct ceph_msg *msg);
|
||||
|
||||
extern int ceph_calc_raw_layout(struct ceph_osd_client *osdc,
|
||||
struct ceph_file_layout *layout,
|
||||
u64 snapid,
|
||||
extern int ceph_calc_raw_layout(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen, u64 *bno,
|
||||
struct ceph_osd_request *req,
|
||||
struct ceph_osd_req_op *op);
|
||||
|
||||
extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
|
||||
int flags,
|
||||
struct ceph_snap_context *snapc,
|
||||
struct ceph_osd_req_op *ops,
|
||||
unsigned int num_op,
|
||||
bool use_mempool,
|
||||
gfp_t gfp_flags,
|
||||
struct page **pages,
|
||||
struct bio *bio);
|
||||
gfp_t gfp_flags);
|
||||
|
||||
extern void ceph_osdc_build_request(struct ceph_osd_request *req,
|
||||
u64 off, u64 *plen,
|
||||
u64 off, u64 len,
|
||||
unsigned int num_op,
|
||||
struct ceph_osd_req_op *src_ops,
|
||||
struct ceph_snap_context *snapc,
|
||||
struct timespec *mtime,
|
||||
const char *oid,
|
||||
int oid_len);
|
||||
u64 snap_id,
|
||||
struct timespec *mtime);
|
||||
|
||||
extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *,
|
||||
struct ceph_file_layout *layout,
|
||||
|
||||
@@ -110,7 +110,7 @@ extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
|
||||
|
||||
/* calculate mapping of a file extent to an object */
|
||||
extern int ceph_calc_file_object_mapping(struct ceph_file_layout *layout,
|
||||
u64 off, u64 *plen,
|
||||
u64 off, u64 len,
|
||||
u64 *bno, u64 *oxoff, u64 *oxlen);
|
||||
|
||||
/* calculate mapping of object to a placement group */
|
||||
|
||||
Reference in New Issue
Block a user