Linux-kernel mailing list archive 1999-34,: Re: [PATCH] robust ext2fs against failure

# Re: [PATCH] robust ext2fs against failure

kaz@earth.email.ne.jp
Fri, 27 Aug 1999 16:20:59 +0900 (JST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Woodhouse: "Re: 2.3.15 ifconfig oops"
- Previous message: Enrique Bernal: "NFS client doesn't see changes in files from NFS server"
- In reply to: Theodore Y. Ts'o: "Re: [PATCH] robust ext2fs against failure"

"Theodore Y. Ts'o" <tytso@mit.edu> writes:

tytso> The situation which I mean is that one new directory entry is
tytso> allocated to point a newly-created memory inode, but corresponding
tytso> disk inode still contains GARBAGE then:
tytso>
tytso> dir-entry inode
tytso>
tytso> fs/ntfs/ ---------- Makefile
tytso> :
tytso> ......:
tytso> :
tytso> /tmp/ ------+--> tmp990825
tytso>
tytso> ---> memory inode
tytso> .... garbage on the disk (of cource, overwritten in future...)
tytso>
tytso> If system crashes before the memory INODE is written back over the
tytso> garbage, it causes doubly-linked file.
tytso>
tytso> OK, this only happens where "Makefile" is a newly created file. (That

Hmm...? I do not think so.

1. 'Makefile' stably exists already.
2. /tmp/tmp99825 is newly created.
2a. Memory inode is allocated for /tmp/tmp99825.
2b. But its correspoding data is garbage and points Makefile
(Perhaps it is rare case..., I agree with you)
3. Crash here.
4. Valid memory inode is lost, garbage disk-inode is left
pointing Makefile.

tytso> system crash. Since metadata is synced to the disk every five seconds,
tytso> and in order for this to happen you have to get fairly unlucky such that
tytso> the ext2 file allocation algorithm picks the just-deleted-inode as the
tytso> one to be used for the new inode, this is **not** a common case.

Yes, it is not so common case, but isn't rare case worth consideration?

-
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/

- Next message: David Woodhouse: "Re: 2.3.15 ifconfig oops"
- Previous message: Enrique Bernal: "NFS client doesn't see changes in files from NFS server"
- In reply to: Theodore Y. Ts'o: "Re: [PATCH] robust ext2fs against failure"