rbd: expose the correct size of the device in sysfs

If an image was mapped to a snapshot, the size of the head version
would be shown. Protect capacity with header_rwsem, since it may
change.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Alex Elder <elder@inktank.com>
This commit is contained in:
Josh Durgin 2011-12-05 10:35:04 -08:00 • committed by Sage Weil
commit a51aa0c042