FS-corruption on ext3 with HTrees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm working with Prof. Zadok on versionfs, a stackable versioning file
system. I face some problems with the unlink operation on ext3 with
htree.

On an unlink, I make a copy of the file (version/backup) and unlink
the original file. But some files that have been unlinked are "linked
back" to another file.  For example, on deleting the file 'foo', the
file itself is deleted and its backup is made, but "foo" points to
a seemingly unrelated inode.

On fscking the file system, fsck reports that the inode which "foo"
now points to has an incorrect refcount and increments that particular
inode's ref-count to 2.

There was a mail on ext3-users about a year ago reporting a similar
problem:

https://listman.redhat.com/archives/ext3-users/2002-October/msg00053.html

I don't know if it was fixed.

In my code, I'm using only vfs calls and do nothing that is specific
to ext3. This works fine on ext3 and ext2 without HTrees, but this
behavior occurs on ext3 with Htrees.  Here's a high level description
of what I'm doing in versionfs_unlink:

 * down the isem of parent directory
 * compute the name of the version file
 * lookup the name using lookup_one_len
 * create the version'ed file using vfs_create
 * open the original file using dentry_open
 * copy the data from the original file to the version file
 * close the original file and version file
 * upping the isem of the parent directory
 * call vfs_unlink as it would have been called normally

Let me know if I'm doing something wrong.

Thanks,
Kiran,
SUNY Stony Brook.


_______________________________________________

Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux