diff options
author | Wang Shilong <wangsl.fnst@cn.fujitsu.com> | 2014-01-03 05:22:57 -0500 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-28 16:20:15 -0500 |
commit | e8117c26b24098496b6011aabe84e43e0189a506 (patch) | |
tree | 637db93597bb491bc77400b7d8f28049d6e4365b | |
parent | 17504584f52af944960f1ad16752aa10a0755b3b (diff) |
Btrfs: only fua the first superblock when writting supers
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>
-rw-r--r-- | fs/btrfs/disk-io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 0400a26fc8c5..9850a51a3f19 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -3133,7 +3133,10 @@ static int write_dev_supers(struct btrfs_device *device, | |||
3133 | * we fua the first super. The others we allow | 3133 | * we fua the first super. The others we allow |
3134 | * to go down lazy. | 3134 | * to go down lazy. |
3135 | */ | 3135 | */ |
3136 | ret = btrfsic_submit_bh(WRITE_FUA, bh); | 3136 | if (i == 0) |
3137 | ret = btrfsic_submit_bh(WRITE_FUA, bh); | ||
3138 | else | ||
3139 | ret = btrfsic_submit_bh(WRITE_SYNC, bh); | ||
3137 | if (ret) | 3140 | if (ret) |
3138 | errors++; | 3141 | errors++; |
3139 | } | 3142 | } |