]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: expose the correct size of the device in sysfs
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 5 Dec 2011 18:35:04 +0000 (10:35 -0800)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:15:38 +0000 (18:15 -0700)
commit46763ca7661feeb03eeb66ff813cafe5f8c1d600
tree4afc8c5ba8508f5ccfe07aefe8eeb9b98044d6d4
parent2a435238ef357fff68146306e44f3916ce45071d
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>
drivers/block/rbd.c