diff options
author | Yu Kuai <[email protected]> | 2024-02-29 17:57:09 +0800 |
---|---|---|
committer | Song Liu <[email protected]> | 2024-02-29 22:49:46 -0800 |
commit | f109207629552cb04c2a48e90abe7c481e363984 (patch) | |
tree | e3978d7544ef8aa1c42428465d118988131af3ba /tools/perf/scripts/python/export-to-sqlite.py | |
parent | f29841ff3b272e1703454f93b96baf0fe0d9f31a (diff) |
md/raid1-10: factor out a new helper raid1_should_read_first()
If resync is in progress, read_balance() should find the first usable
disk, otherwise, data could be inconsistent after resync is done. raid1
and raid10 implement the same checking, hence factor out the checking
to make code cleaner.
Noted that raid1 is using 'mddev->recovery_cp', which is updated after
all resync IO is done, while raid10 is using 'conf->next_resync', which
is inaccurate because raid10 update it before submitting resync IO.
Fortunately, raid10 read IO can't concurrent with resync IO, hence there
is no problem. And this patch also switch raid10 to use
'mddev->recovery_cp'.
Co-developed-by: Paul Luse <[email protected]>
Signed-off-by: Paul Luse <[email protected]>
Signed-off-by: Yu Kuai <[email protected]>
Reviewed-by: Xiao Ni <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions