At 03/13/2017 03:42 PM, Anand Jain wrote:
The only error that write dev flush (send) will fail is due
to the ENOMEM then, as its not a device specific error and
rather a system wide issue, we should rather stop further
iterations and perpetuate the -ENOMEM error to the caller.

Signed-off-by: Anand Jain <anand.j...@oracle.com>

Looks good.

Although it would be better to add one line comment for the reason.
It's obvious when reading your commit message, but not so when reading the code itself.

Reviewed-by: Qu Wenruo <quwen...@cn.fujitsu.com>

Thanks,
Qu
---
 fs/btrfs/disk-io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 08b74daf35d0..ee3e601da511 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3592,7 +3592,7 @@ static int barrier_all_devices(struct btrfs_fs_info *info)

                ret = write_dev_flush(dev, 0);
                if (ret)
-                       errors_send++;
+                       return ret;
        }

        /* wait for all the barriers */



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to