Closed Polynomial-C closed 8 months ago
Thanks for the report, the fix is below, will be added to devel.
--- a/cmds/filesystem-usage.c
+++ b/cmds/filesystem-usage.c
@@ -807,6 +807,7 @@ static int load_device_info(int fd, struct array *devinfos)
device_get_partition_size((const char *)dev_info.path);
}
info->size = dev_info.total_bytes;
+ ndevs++;
}
if (ndevs != fi_args.num_devices) {
Since commit 88c25674c7c0d0ae90bde07975b7beffbe05b80f the command
btrfs device usage <dev>
emits the following error message:ERROR: unexpected number of devices: 0 != 1
Here's a complete example:
Reverting commit 88c25674c7c0d0ae90bde07975b7beffbe05b80f "fixes" the issue. Kernel version where I have observed this is
6.1.59
(LTS).