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>
This commit is contained in:
Wang Shilong 2014-01-03 18:22:57 +08:00 committed by Chris Mason
parent 17504584f5
commit e8117c26b2
1 changed files with 4 additions and 1 deletions

View 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++;
}