Messages in this thread |  | | From | Daniel Phillips <> | Subject | Re: Advanced Linux Kernel/Enterprise Linux Kernel | Date | Sun, 19 Nov 2000 21:37:21 +0100 |
| |
Pavel Machek wrote: > > Actually, I was planning on doing on putting in a hack to do something > > like that: calculate a checksum after every buffer data update and check > > it after write completion, to make sure nothing scribbled in the buffer > > in the interim. This would also pick up some bad memory problems. > > You might want to take look to a patch with crc loop option. > > It does verify during read, not during write; but that's even better because > that way you pick up problems in IO subsystem, too.
You would have to store the checksums on the filesystem then, or use a verify-after-write. What I was talking about is a verify-the-buffer-didn't get scribbled. I'd then trust the hardware to report a write failure. Note that if something scribbles on your buffer between the time you put good data on it and when it gets transfered to disk, you can verify perfectly and still have a hosed filesystem.
It was pointed out that you can't really do what I'm suggesting for mmaped file data, and there's some truth to that - but certainly the interval between when ->writepage gets called and when the actual buffer write happens can be secured in this way. Doing this only for metadata is also a good idea because then the overhead would be close to nil and the basic fs integrity would be protected.
-- Daniel - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |