"Peter T. Breuer" wrote: > "Paul Clements wrote:" > > > 3/ Internally, you need to store a counter for each 'chunk' (need a > > mechanism for tracking multiple pending writes to the same 'chunk'. One > We cannot account for how many bits are really dirty in this chunk. That's OK, we don't need to know. We really just want to know if there are any outstanding writes for that chunk. We increment the chunk counter for every write and decrement it when the write finishes. Now, if the backup device fails, we'll bring it back online at some point and do a (partial) resync, using the bitmap as a guide. For every chunk, if the counter is non-zero, we have to do a full resync of every block in that chunk. We then set the counter back to 0 only after we're done resyncing the last block in that chunk. So we really don't care how many blocks are dirty, just that there are or are not dirty blocks in the chunk. Does that make sense? -- Paul - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html