From da28664bf77fbd24ded2987d9792e1209c522433 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 24 Apr 2014 18:57:12 +0200 Subject: btrfs-progs: compare unallocated space against the correct value The device may not be fully occupied by the filesystem, the value of Unallocated should not be calculated against the device size but the size provided by DEV_INFO. Signed-off-by: David Sterba --- cmds-device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cmds-device.c') diff --git a/cmds-device.c b/cmds-device.c index 546db6de..197f9d59 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -477,10 +477,8 @@ static int _cmd_device_usage(int fd, char *path, int mode) printf("%s, ID: %llu\n", device_info_ptr[i].path, device_info_ptr[i].devid); print_device_sizes(fd, &device_info_ptr[i], mode); - print_device_chunks(fd, device_info_ptr[i].devid, - device_info_ptr[i].size, - info_ptr, info_count, - mode); + print_device_chunks(fd, &device_info_ptr[i], + info_ptr, info_count, mode); printf("\n"); } -- cgit v1.2.3