Messages in this thread | | | Date | 23 Dec 98 15:22:54 +0330 | From | "RPICHAI.IN.ORACLE.COM" <> | Subject | Strange behaviour of file systems |
| |
Hi,
I am figuring out the behaviour of buffer cache and have been facing a strange problems. I am creating a test directory and copying some ascii files to that directory after which I do a sync and then execute the command "cat /mnt/*" in a loop where /mnt is the mount point for that device. In the middle of this operation, I shutdown my machine. The next time I reboot the machine, the device is corrupted and after doing e2fsck on that, half the files are corrupted. My doubt is cat should open all the files in read only mode; then why is the file system getting modified. My understanding is fs will be put in an inconsistent state only if there are dirty buffers/inodes not yet flushed and the shutdown occurs. Here I am making sure that all my buffers are flushed back( I go thru the OS's buffer cache and print out all the dirty buffers for the device; there are none) and I am opening the files in read only mode. How does the file system reach an inconsistent state? Thanks and Regards Raghav -------------------------------------------------------------------------- P.Raghavan Member of Technical Staff, Oracle Software India Ltd. e-mail : rpichai@in.oracle.com Phone : 2283004, 2283005 Ext 1027 -----------------------------------------------------------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |