]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:51:18 +0000 (08:51 -0800)
commit929333aa674e6c1b3026a3b3c8f27907e9a7de5b
tree3846998f54e74534980bda70471082815e6ddcbc
parent7272b7d3db9160716acce4ae387cf98fd24ff820
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>
(cherry picked from commit a51aa0c042fa39946dd017d5f91a073300a71577)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/rbd.c