rbd: prefix rbd writes with CEPH_OSD_OP_SETALLOCHINT osd op
authorIlya Dryomov <ilya.dryomov@inktank.com>
Tue, 25 Feb 2014 14:22:28 +0000 (16:22 +0200)
committerYan, Zheng <zheng.z.yan@intel.com>
Thu, 3 Apr 2014 02:33:52 +0000 (10:33 +0800)
commit0ccd59266973047770d5160318561c9189b79c93
tree9785ab285acb42a3ed359dbb9290402ce34ec960
parentdeb236b300cea3e7a114115571194b9872dbdfd1
rbd: prefix rbd writes with CEPH_OSD_OP_SETALLOCHINT osd op

In an effort to reduce fragmentation, prefix every rbd write with
a CEPH_OSD_OP_SETALLOCHINT osd op with an expected_write_size value set
to the object size (1 << order).  Backwards compatibility is taken care
of on the libceph/osd side.

"The CEPH_OSD_OP_SETALLOCHINT hint is durable, in that it's enough to
do it once.  The reason every rbd write is prefixed is that rbd doesn't
explicitly create objects and relies on writes creating them
implicitly, so there is no place to stick a single hint op into.  To
get around that we decided to prefix every rbd write with a hint (just
like write and setattr ops, hint op will create an object implicitly if
it doesn't exist)."

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
drivers/block/rbd.c
This page took 0.024451 seconds and 5 git commands to generate.