Re: md: persistent (file-backed) bitmap

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

 



Hi Paul,
 I've been looking through the bitmap code again and found the
 handling of resync a bit hard to wrap my brain around.  The handling
 of the counter here seems a bit non-obvious and possibly fragile.

 I would like to make a change, but thought I should bounce it off you
 first.

 I would like to change the "RESYNC_MASK" bit to mean:
   At least one block in this chunk is out-of-sync.

 Then:
  - When we read the bitmap from disk we set this bit and the
    SHADOW_MASK, but leave the counter at zero.
  - When we get a failed write, we set this bit, but still decrement
    the counter. 
  - When we are performing a resync, we periodically clear the bit on
    recently completed chunks.
  - We only clear the SHADOW_MASK and on-disk bit when the counter
    hits zero *and* this bit is clear.

 I would find this approach a lot easier to understand.  Are you OK
 with it?

 Also, I would like to move the bitmap_testbit in md_do_sync down into
 the personality.  This should make life easier for other
 personalities like raid10 which use a very different approach for
 resync than for recovery.

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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