[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190607131025.31996-14-naohiro.aota@wdc.com>
Date: Fri, 7 Jun 2019 22:10:19 +0900
From: Naohiro Aota <naohiro.aota@....com>
To: linux-btrfs@...r.kernel.org, David Sterba <dsterba@...e.com>
Cc: Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
Qu Wenruo <wqu@...e.com>, Nikolay Borisov <nborisov@...e.com>,
linux-kernel@...r.kernel.org, Hannes Reinecke <hare@...e.com>,
linux-fsdevel@...r.kernel.org,
Damien Le Moal <damien.lemoal@....com>,
Matias Bjørling <mb@...htnvm.io>,
Johannes Thumshirn <jthumshirn@...e.de>,
Bart Van Assche <bvanassche@....org>,
Naohiro Aota <naohiro.aota@....com>
Subject: [PATCH 13/19] btrfs: avoid sync IO prioritization on checksum in HMZONED mode
Btrfs prioritize sync I/Os to be handled by async checksum worker earlier.
As a result, checksumming sync I/Os to larger logical extent address can
finish faster than checksumming non-sync I/Os to smaller logical extent
address.
Since we have upper limit of number of checksum worker, it is possible that
sync I/Os to wait forever for non-starting checksum of I/Os for smaller
address.
This situation can be reproduced by e.g. fstests btrfs/073.
To avoid such disordering, disable sync IO prioritization for now. Note
that sync I/Os anyway must wait for I/Os to smaller address to finish. So,
actually prioritization have no benefit in HMZONED mode.
Signed-off-by: Naohiro Aota <naohiro.aota@....com>
---
fs/btrfs/disk-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 56a416902ce7..6651986da470 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -838,7 +838,7 @@ blk_status_t btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
async->status = 0;
- if (op_is_sync(bio->bi_opf))
+ if (op_is_sync(bio->bi_opf) && !btrfs_fs_incompat(fs_info, HMZONED))
btrfs_set_work_high_priority(&async->work);
btrfs_queue_work(fs_info->workers, &async->work);
--
2.21.0
Powered by blists - more mailing lists