mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-02 00:00:03 +03:00
Fix cmd_fs_usage for more than 4 devices
The ioctl returns -ERANGE when there's more devices than fit in the buffer, not -ENOSPC Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
parent
34b9374705
commit
07a0a5b5c4
@ -152,7 +152,7 @@ static inline struct bch_ioctl_usage *bchu_usage(struct bchfs_handle fs)
|
||||
if (!ioctl(fs.ioctl_fd, BCH_IOCTL_USAGE, u))
|
||||
return u;
|
||||
|
||||
if (errno != ENOSPC)
|
||||
if (errno != ERANGE)
|
||||
die("BCH_IOCTL_USAGE error: %m");
|
||||
nr_devices *= 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user