aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ceph/osd_client.h
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-02-25 09:22:27 -0500
committerYan, Zheng <zheng.z.yan@intel.com>2014-04-02 22:33:51 -0400
commitc647b8a8c6366f849c2a237bfe525cb1d316d5f4 (patch)
tree8f3385992b44ba6bb5bcb1d745bb6df4dd6b5bbf /include/linux/ceph/osd_client.h
parent7b25bf5f02c5c80adf96120e031dc3a1756ce54d (diff)
libceph: add support for CEPH_OSD_OP_SETALLOCHINT osd op
This is primarily for rbd's benefit and is supposed to combat fragmentation: "... knowing that rbd images have a 4m size, librbd can pass a hint that will let the osd do the xfs allocation size ioctl on new files so that they are allocated in 1m or 4m chunks. We've seen cases where users with rbd workloads have very high levels of fragmentation in xfs and this would mitigate that and probably have a pretty nice performance benefit." SETALLOCHINT is considered advisory, so our backwards compatibility mechanism here is to set FAILOK flag for all SETALLOCHINT ops. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'include/linux/ceph/osd_client.h')
-rw-r--r--include/linux/ceph/osd_client.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index e94f5da251d6..c42d1ada685f 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -103,6 +103,10 @@ struct ceph_osd_req_op {
103 u32 timeout; 103 u32 timeout;
104 __u8 flag; 104 __u8 flag;
105 } watch; 105 } watch;
106 struct {
107 u64 expected_object_size;
108 u64 expected_write_size;
109 } alloc_hint;
106 }; 110 };
107}; 111};
108 112
@@ -294,6 +298,10 @@ extern void osd_req_op_cls_init(struct ceph_osd_request *osd_req,
294extern void osd_req_op_watch_init(struct ceph_osd_request *osd_req, 298extern void osd_req_op_watch_init(struct ceph_osd_request *osd_req,
295 unsigned int which, u16 opcode, 299 unsigned int which, u16 opcode,
296 u64 cookie, u64 version, int flag); 300 u64 cookie, u64 version, int flag);
301extern void osd_req_op_alloc_hint_init(struct ceph_osd_request *osd_req,
302 unsigned int which,
303 u64 expected_object_size,
304 u64 expected_write_size);
297 305
298extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc, 306extern struct ceph_osd_request *ceph_osdc_alloc_request(struct ceph_osd_client *osdc,
299 struct ceph_snap_context *snapc, 307 struct ceph_snap_context *snapc,