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:
Kent Overstreet 2019-06-13 11:10:11 -04:00
parent 34b9374705
commit 07a0a5b5c4

View File

@ -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;
}