From: David Sterba Date: Tue, 24 Jan 2017 16:46:10 +0000 (+0100) Subject: btrfs-progs: qgroup show: do not error if sync fails X-Git-Tag: upstream/4.16.1~856 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c87a1b92c249da0406226e1e8540dc383165ced;p=platform%2Fupstream%2Fbtrfs-progs.git 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 --- diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 9b245b0..f4503fd 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) {