lkml.org 
[lkml]   [1998]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectStrange 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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [from the cache]
©2003-2011 Jasper Spaans