Neil Brown <neilb@xxxxxxx> writes: > On Wed, 24 Feb 2010 09:46:23 -0500 > Bill Davidsen <davidsen@xxxxxxx> wrote: > >> > There is no question of data corruption. >> > When memory changes between being written to one device and to another, this >> > does not cause corruption, only inconsistency. Either the block will be >> > written again consistently soon, or it will never be read. >> > >> >> Just what is it that rewrites the data block? The user program doesn't >> know it's needed, the filesystem, if any, doesn't know it's needed, and >> as far as I can tell md doesn't do checksum before issuing the write and >> after the last write is done. Doesn't make a copy and write from that. >> So what sees that the data has changed and rewrites it? >> > > The filesystem re-writes the block, though probably it is more accurate to > say 'the page cache' rewrites the block (the page cache is essentially just a > library of code that the filesystem uses). > > When a page is changed, its 'Dirty' flag is set. > Before a page is written out, the Dirty flag is cleared. > So if a page is written differently to two devices, then it must have been > changed after the Dirty flag was clear, so the Dirty flag will be set, so the > page cache will try to write it out again (after about 30 seconds or at > unmount time). So maybe MD could check the dirty flag after write and then output a warning so we can track down the issue. MD could also rewrite the page prior to setting the disks in-sync until the dirty bit is clear after a write. MfG Goswin -- 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