diff options
author | David Sterba <dsterba@suse.com> | 2017-01-24 17:46:10 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-01-25 09:48:38 +0100 |
commit | 5c87a1b92c249da0406226e1e8540dc383165ced (patch) | |
tree | 8f380b12a66e4fc83c7b1086094db65fa111d08f | |
parent | 6f7c540d77055dde53df7b7463ce656d42ec6c3b (diff) |
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>
-rw-r--r-- | cmds-qgroup.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 9b245b09..f4503fd9 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -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) { |