Skip to content
Commit 3b434a2a authored by Josh Durgin's avatar Josh Durgin Committed by Ilya Dryomov
Browse files

rbd: extract a method for adding object operations



rbd_img_request_fill() creates a ceph_osd_request and has logic for
adding the appropriate osd ops to it based on the request type and
image properties.

For layered images, the original rbd_obj_request is resent with a
copyup operation in front, using a new ceph_osd_request. The logic for
adding the original operations should be the same as when first
sending them, so move it to a helper function.

op_type only needs to be checked once, so create a helper for that as
well and call it outside the loop in rbd_img_request_fill().

Signed-off-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 1c220881
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment