提交 db95c876 编写于 作者: D David Sterba

btrfs: submit superblock io with REQ_META and REQ_PRIO

The superblock is also metadata of the filesystem so the relevant IO
should be tagged as such. We also tag it as high priority, as it's the
last block committed for metadata from a given transaction. Any delays
would effectively block the whole transaction, also blocking any other
operation holding the device_list_mutex.
Reviewed-by: NJosef Bacik <jbacik@fb.com>
Reviewed-by: NLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 dc59215d
...@@ -3433,9 +3433,10 @@ static int write_dev_supers(struct btrfs_device *device, ...@@ -3433,9 +3433,10 @@ static int write_dev_supers(struct btrfs_device *device,
*/ */
if (i == 0) { if (i == 0) {
ret = btrfsic_submit_bh(REQ_OP_WRITE, ret = btrfsic_submit_bh(REQ_OP_WRITE,
REQ_SYNC | REQ_FUA, bh); REQ_SYNC | REQ_FUA | REQ_META | REQ_PRIO, bh);
} else { } else {
ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_SYNC, bh); ret = btrfsic_submit_bh(REQ_OP_WRITE,
REQ_SYNC | REQ_META | REQ_PRIO, bh);
} }
if (ret) if (ret)
errors++; errors++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册