]> Pileus Git - ~andy/linux/commitdiff
Btrfs: only fua the first superblock when writting supers
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Fri, 3 Jan 2014 10:22:57 +0000 (18:22 +0800)
committerChris Mason <clm@fb.com>
Tue, 28 Jan 2014 21:20:15 +0000 (13:20 -0800)
We only intent to fua the first superblock in every device from
comments, fix it.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/disk-io.c

index 0400a26fc8c50cf8ed86cf86cf49e78ca3601c60..9850a51a3f1900b3065eec1d1cd2bdb14eb509b6 100644 (file)
@@ -3133,7 +3133,10 @@ static int write_dev_supers(struct btrfs_device *device,
                 * we fua the first super.  The others we allow
                 * to go down lazy.
                 */
-               ret = btrfsic_submit_bh(WRITE_FUA, bh);
+               if (i == 0)
+                       ret = btrfsic_submit_bh(WRITE_FUA, bh);
+               else
+                       ret = btrfsic_submit_bh(WRITE_SYNC, bh);
                if (ret)
                        errors++;
        }