]> git.openfabrics.org - ~emulex/infiniband.git/commit
rbd: use helpers to handle discard for layered images correctly
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 7 Apr 2014 23:49:21 +0000 (16:49 -0700)
committerIlya Dryomov <idryomov@redhat.com>
Tue, 14 Oct 2014 17:03:36 +0000 (21:03 +0400)
commitd3246fb0da5d70838469c01d5b6b11163b49cd86
tree1770ff1c699df0469a02d5cabd7060afa810b9e2
parent3b434a2aff38029ea053ce6c8fced53b2d01f7f0
rbd: use helpers to handle discard for layered images correctly

Only allocate two osd ops for discard requests, since the
preallocation hint is only added for regular writes.  Use
rbd_img_obj_request_fill() to recreate the original write or discard
osd operations, isolating that logic to one place, and change the
assert in rbd_osd_req_create_copyup() to accept discard requests as
well.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c