[forgot to keep list in cc] ---------- Forwarded message ---------- From: Manish Katiyar <mkatiyar@xxxxxxxxx> Date: Sun, Dec 21, 2008 at 10:30 PM Subject: Re: synchronous metadata update To: Sandeep K Sinha <sandeepksinha@xxxxxxxxx> On Sun, Dec 21, 2008 at 7:52 PM, Sandeep K Sinha <sandeepksinha@xxxxxxxxx> wrote: > Hi Shyam, > > On Sun, Dec 21, 2008 at 6:41 PM, Shyam Burkule <shyam.burkule@xxxxxxxxx> wrote: >> Hi, >> I am new to Linux Filesystem. I read that "Most Unix file system use >> synchronous writes for metadata update to ensure filesystem coverability and >> data intregrity after system crash." But here I am not understanding how >> updating metadata helps keeping fs consistent? Does it also means of keeping >> file data consistent? Please clarify.. >> > > When you say a file system as consistent, It means that you would be > able to mount the filesystem. The superblock would be in the > consistent state. Not only that........in fact if your superblock is corrupt, filesystem is screwed badly you are on the other end of fs inconsistency. But most common examples of filesystem inconsistency i would say would be suppose if you are writing some data to a new file in some directory. This would consist of below steps (rougly) a) allocating an inode b) creating a directory entry c) updating inode fields and writing data Now since (a) & (b) are metadata updates, because fs would be inconsistent if you have a directory entry but not an allocated inode for it, or you have an inode allocated but no file/entry pointing to it. Though these things are easily detectable/fixable by fsck. Similarly deletes would have to ensure that you perform them in such an order so that you don't have a stale directory entry. Please read "journal-design.pdf" by stephen tweedie. That will give you a good insight of such problems. Thanks - Manish > The point is that even if you loose the data for a couple of files, > still your file system will be up and you would be able to access the > data for other files. > If you loose the consistency of a file system( e.g superblock) then > would loose everything. > > There are other tools that can be used to recover the data of a file > or revert back the file to a consistent state but if you loose > superblock then you land NOWHERE. > >> >> Thanks >> Shyam. >> > > > > -- > Regards, > Sandeep. > > > > > > > "To learn is to change. Education is a process that changes the learner." > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ