« Previous | Next » 

Revision fcff3897


Added by Iustin Pop about 14 years ago

bdev: Add function for reading actual disk size

This patch adds a GetActualSize for block devices that returns the
actual disk size. It is done using blockdev (and stat for file storage).

While this could be done via reading /sys/block/N/size, that is not as
simple as running blockdev, as the correspondence between an LV and its
sys entry is not straightforward.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences