lkml.org 
[lkml]   [1999]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] robust ext2fs against failure
Date
From
"Theodore Y. Ts'o" <tytso@mit.edu> writes:

tytso> I can not say positively, but perhaps it is because some new directory
tytso> entry which contains garbage (on disk) was allocated for some new
tytso> file. If the garbage data points NTFS makefile accidentally and system
tytso> crashes before the directory entry is written back, new file and NTFS
tytso> makefile are doubly hard-linked. Someone writes binary data to the new
tytso> file, NTFS makefile would be also altered...
tytso>
tytso> If you ran e2fsck after the each system crash, it would have detected
tytso> any doubly allocated files and offered to clone the data blocks to avoid
tytso> this problem.

Probably my example is not so clear/adequate...

The situation which I mean is that one new directory entry is
allocated to point a newly-created memory inode, but corresponding
disk inode still contains GARBAGE then:

dir-entry inode

fs/ntfs/ ---------- Makefile
:
......:
:
/tmp/ ------+--> tmp990825

---> memory inode
.... garbage on the disk (of cource, overwritten in future...)

If system crashes before the memory INODE is written back over the
garbage, it causes doubly-linked file.

From my reading, e2fsck just copys DUP BLOCKS, but does not
replicate files (inodes) pointed from two separate directory
entries. E2fsck just adds 1 reference count to the inode.

Thanks.

-
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:53    [W:0.082 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site