diff options
author | Yu Kuai <yukuai3@huawei.com> | 2022-09-16 19:34:28 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2022-09-22 00:05:05 -0700 |
commit | b9b083f9044abf89f3391fbc196ddece68ac9dba (patch) | |
tree | e68cc5787d8330edd314232e3bdb9deac95594f8 /drivers/md/raid10.h | |
parent | 4f350284a7306b3dff676caeafd3faf1b5c068d5 (diff) |
md/raid10: convert resync_lock to use seqlock
Currently, wait_barrier() will hold 'resync_lock' to read 'conf->barrier',
and io can't be dispatched until 'barrier' is dropped.
Since holding the 'barrier' is not common, convert 'resync_lock' to use
seqlock so that holding lock can be avoided in fast path.
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-and-Tested-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
Diffstat (limited to 'drivers/md/raid10.h')
-rw-r--r-- | drivers/md/raid10.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/raid10.h b/drivers/md/raid10.h index 5c0804d8bb1f..8c072ce0bc54 100644 --- a/drivers/md/raid10.h +++ b/drivers/md/raid10.h @@ -76,7 +76,7 @@ struct r10conf { /* queue pending writes and submit them on unplug */ struct bio_list pending_bio_list; - spinlock_t resync_lock; + seqlock_t resync_lock; atomic_t nr_pending; int nr_waiting; int nr_queued; |