Skip to content
Snippets Groups Projects
Commit fcff3897 authored by Iustin Pop's avatar Iustin Pop
Browse files

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: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent b4ec07f8
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment