From: Josh Durgin Date: Sat, 5 Apr 2014 00:32:15 +0000 (-0700) Subject: rbd: extract a method for adding object operations X-Git-Tag: fixes-against-v3.18-rc2~71^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b434a2aff38029ea053ce6c8fced53b2d01f7f0;p=pandora-kernel.git 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: Josh Durgin --- Reading git-diff-tree failed