md/raid10: convert resync_lock to use seqlock
authorYu Kuai <yukuai3@huawei.com>
Fri, 16 Sep 2022 11:34:28 +0000 (19:34 +0800)
committerSong Liu <song@kernel.org>
Thu, 22 Sep 2022 07:05:05 +0000 (00:05 -0700)
commitb9b083f9044abf89f3391fbc196ddece68ac9dba
treee68cc5787d8330edd314232e3bdb9deac95594f8
parent4f350284a7306b3dff676caeafd3faf1b5c068d5
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>
drivers/md/raid10.c
drivers/md/raid10.h