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 <iustin@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
Loading
Please register or sign in to comment