aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/osd_client.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-26 18:53:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-26 18:53:16 -0400
commitd5a38f6e4668b3110a66cd96ce2096184bf66def (patch)
treebd2209de25a343e7b01d143abce7bf774122227f /include/linux/ceph/osd_client.h
parent698f415cf5756e320623bdb015a600945743377c (diff)
parent5ee61e95b6b33c82f6fa1382585faed66aa01245 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph updates from Sage Weil: "There is quite a bit here, including some overdue refactoring and cleanup on the mon_client and osd_client code from Ilya, scattered writeback support for CephFS and a pile of bug fixes from Zheng, and a few random cleanups and fixes from others" [ I already decided not to pull this because of it having been rebased recently, but ended up changing my mind after all. Next time I'll really hold people to it. Oh well. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (34 commits) libceph: use KMEM_CACHE macro ceph: use kmem_cache_zalloc rbd: use KMEM_CACHE macro ceph: use lookup request to revalidate dentry ceph: kill ceph_get_dentry_parent_inode() ceph: fix security xattr deadlock ceph: don't request vxattrs from MDS ceph: fix mounting same fs multiple times ceph: remove unnecessary NULL check ceph: avoid updating directory inode's i_size accidentally ceph: fix race during filling readdir cache libceph: use sizeof_footer() more ceph: kill ceph_empty_snapc ceph: fix a wrong comparison ceph: replace CURRENT_TIME by current_fs_time() ceph: scattered page writeback libceph: add helper that duplicates last extent operation libceph: enable large, variable-sized OSD requests libceph: osdc->req_mempool should be backed by a slab pool libceph: make r_request msg_size calculation clearer ...
Diffstat (limited to 'include/linux/ceph/osd_client.h')
-rw-r--r--include/linux/ceph/osd_client.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index 7506b485bb6d..4343df806710 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -43,7 +43,8 @@ struct ceph_osd {
43}; 43};
44 44
45 45
46#define CEPH_OSD_MAX_OP 3 46#define CEPH_OSD_SLAB_OPS 2
47#define CEPH_OSD_MAX_OPS 16
47 48
48enum ceph_osd_data_type { 49enum ceph_osd_data_type {
49 CEPH_OSD_DATA_TYPE_NONE = 0, 50 CEPH_OSD_DATA_TYPE_NONE = 0,
@@ -77,7 +78,10 @@ struct ceph_osd_data {
77struct ceph_osd_req_op { 78struct ceph_osd_req_op {
78 u16 op; /* CEPH_OSD_OP_* */ 79 u16 op; /* CEPH_OSD_OP_* */
79 u32 flags; /* CEPH_OSD_OP_FLAG_* */ 80 u32 flags; /* CEPH_OSD_OP_FLAG_* */
80 u32 payload_len; 81 u32 indata_len; /* request */
82 u32 outdata_len; /* reply */
83 s32 rval;
84
81 union { 85 union {
82 struct ceph_osd_data raw_data_in; 86 struct ceph_osd_data raw_data_in;
83 struct { 87 struct {
@@ -136,7 +140,6 @@ struct ceph_osd_request {
136 140
137 /* request osd ops array */ 141 /* request osd ops array */
138 unsigned int r_num_ops; 142 unsigned int r_num_ops;
139 struct ceph_osd_req_op r_ops[CEPH_OSD_MAX_OP];
140 143
141 /* these are updated on each send */ 144 /* these are updated on each send */
142 __le32 *r_request_osdmap_epoch; 145 __le32 *r_request_osdmap_epoch;
@@ -148,8 +151,6 @@ struct ceph_osd_request {
148 struct ceph_eversion *r_request_reassert_version; 151 struct ceph_eversion *r_request_reassert_version;
149 152
150 int r_result; 153 int r_result;
151 int r_reply_op_len[CEPH_OSD_MAX_OP];
152 s32 r_reply_op_result[CEPH_OSD_MAX_OP];
153 int r_got_reply; 154 int r_got_reply;
154 int r_linger; 155 int r_linger;
155 156
@@ -174,6 +175,8 @@ struct ceph_osd_request {
174 unsigned long r_stamp; /* send OR check time */ 175 unsigned long r_stamp; /* send OR check time */
175 176
176 struct ceph_snap_context *r_snapc; /* snap context for writes */ 177 struct ceph_snap_context *r_snapc; /* snap context for writes */
178
179 struct ceph_osd_req_op r_ops[];
177}; 180};
178 181
179struct ceph_request_redirect { 182struct ceph_request_redirect {
@@ -263,6 +266,8 @@ extern void osd_req_op_extent_init(struct ceph_osd_request *osd_req,
263 u64 truncate_size, u32 truncate_seq); 266 u64 truncate_size, u32 truncate_seq);
264extern void osd_req_op_extent_update(struct ceph_osd_request *osd_req, 267extern void osd_req_op_extent_update(struct ceph_osd_request *osd_req,
265 unsigned int which, u64 length); 268 unsigned int which, u64 length);
269extern void osd_req_op_extent_dup_last(struct ceph_osd_request *osd_req,
270 unsigned int which, u64 offset_inc);
266 271
267extern struct ceph_osd_data *osd_req_op_extent_osd_data( 272extern struct ceph_osd_data *osd_req_op_extent_osd_data(
268 struct ceph_osd_request *osd_req, 273 struct ceph_osd_request *osd_req,