Re: [PATCH md 0 of 4] Introduction

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

 



Peter T. Breuer wrote:

Neil - can you describe for me (us all?) what is meant by
intent­logging here.

Since I wrote a lot of the code, I guess I'll try...

Well, I can guess - I suppose the driver marks the bitmap before a write
(or group of writes) and unmarks it when they have completed
successfully.  Is that it?

Yes. It marks the bitmap before writing (actually queues up the bitmap and normal writes in bunches for the sake of performance). The code is actually (loosely) based on your original bitmap (fr1) code.


If so, how does it manage to mark what it is _going_ to do (without
psychic powers) on the disk bitmap?

That's actually fairly easy. The pages for the bitmap are locked in memory, so you just dirty the bits you want (which doesn't actually incur any I/O) and then when you're about to perform the normal writes, you flush the dirty bitmap pages to disk.


Once the writes are complete, a thread (we have the raid1d thread doing this) comes back along and flushes the (now clean) bitmap pages back to disk. If the pages get dirty again in the meantime (because of more I/O), we just leave them dirty and don't touch the disk.

Then resync would only deal with the marked blocks.

Right. It clears the bitmap once things are back in sync.

--
Paul

-
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