btrfs-progs: qgroup show: do not error if sync fails

The sync call is unlikely to fail so we optimistically turn it to a
warning if that happens so we return inaccurate numbers instead of a
hard exit.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-01-24 17:46:10 +01:00
parent 6f7c540d77
commit 5c87a1b92c
1 changed files with 2 additions and 5 deletions

View File

@ -375,12 +375,9 @@ static int cmd_qgroup_show(int argc, char **argv)
if (sync) {
ret = ioctl(fd, BTRFS_IOC_SYNC);
if (ret < 0) {
error("sync ioctl failed on '%s': %s", path,
if (ret < 0)
warning("sync ioctl failed on '%s': %s", path,
strerror(errno));
close_file_or_dir(fd, dirstream);
goto out;
}
}
if (filter_flag) {