Hi,
在 2025/05/27 14:17, Hannes Reinecke 写道:
On 5/24/25 08:13, Yu Kuai wrote:
From: Yu Kuai <yukuai3@xxxxxxxxxx>
This flag is used by llbitmap in later patches to skip raid456 initial
recover and delay building initial xor data to first write.
Signed-off-by: Yu Kuai <yukuai3@xxxxxxxxxx>
Reviewed-by: Christoph Hellwig <hch@xxxxxx>
---
drivers/md/md.c | 12 +++++++++++-
drivers/md/md.h | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
Wouldn't it be enough to check for the 'blocks_synced' callback to check
if the array supports lazy recovery?
I think no, just to check the array supports lazy recovery is not
enough, we still have to distinguish the normal recovery and the lazy
recovery by new bitmap. For example:
+ if (test_bit(MD_RECOVERY_LAZY_RECOVER, &mddev->recovery) &&
+ start == MaxSector)
+ start = 0;
For normal recovery, there is nothing to do, and for lazy recovery,
we'll register a new sync_thread later to recover bits that are
written the first time.
Thanks,
Kuai
Otherwise:
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
Cheers,
Hannes