rbd: set mapping info earlier
authorAlex Elder <elder@inktank.com>
Sat, 27 Apr 2013 14:59:30 +0000 (09:59 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:51 +0000 (21:19 -0700)
commitd1cf5788450e1781f63a0626a854fe8309b32cb1
tree78fc5c0297b73cd684f62513ad330636b3b8e75b
parent05a46afdc7f0f73d42dcecd8ee80f9558b4c38f7
rbd: set mapping info earlier

Set the mapping size and features earlier in rbd_dev_probe_finish().

Define rbd_dev_mapping_clear() as an inverse for setting those
fields, and use it both in error handling in rbd_dev_image_probe()
and in the final cleanup in rbd_dev_release().  Change the name
of rbd_dev_set_mapping() to of rbd_dev_mapping_set().

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