From: David Sterba Date: Fri, 18 Aug 2017 16:16:25 +0000 (+0200) Subject: btrfs: submit superblock io with REQ_META and REQ_PRIO X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=db95c876c568cef951fbbd4c0118cb5386e4bb99;p=openwrt%2Fstaging%2Fblogic.git 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: Josef Bacik Reviewed-by: Liu Bo Signed-off-by: David Sterba --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 90b967ae46d0..27d458640536 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -3433,9 +3433,10 @@ static int write_dev_supers(struct btrfs_device *device, */ if (i == 0) { ret = btrfsic_submit_bh(REQ_OP_WRITE, - REQ_SYNC | REQ_FUA, bh); + REQ_SYNC | REQ_FUA | REQ_META | REQ_PRIO, bh); } 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) errors++;