Re: [PATCH 10/23] md: add a new recovery_flag MD_RECOVERY_LAZY_RECOVER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux