rbd: always check IMG_DATA flag
authorAlex Elder <elder@inktank.com>
Mon, 11 Feb 2013 18:33:24 +0000 (12:33 -0600)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:02 +0000 (21:19 -0700)
commit57acbaa7fb00b6e1a74d29aaaaf273ed8cb4dabc
treed61d9a3626e8ae1b49739358f068108d4daf6877
parentb155e86cf619886388d80ec298b0f13694c83595
rbd: always check IMG_DATA flag

In a few spots, whether the an object request's img_request pointer
is null is used to determine whether an object request is being done
as part of an image data request.

Stop doing that, and instead always use the object request IMG_DATA
flag for that purpose.  Swap the order of the definition of the
IMG_DATA and DONE flag helpers, because obj_request_done_set() now
refers to obj_request_img_data_set() to get its rbd_dev value.

This will become important because the img_request pointer is
about to become part of a union.

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