tech-kern archive

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

[patch] toward a saner rename



(I am not subscribed to this list, so please cc me in replies.)

Rename is still broken in a number of file systems because of races
and deadlocks and an insane locking protocol.  To make it easier to
fix them, and to make it easier to replace the VOP_RENAME protocol by
something less insane in the future, I wrote a general rename
abstraction with a slightly saner protocol, and adapted tmpfs_rename,
ufs_rename, lfs_rename, and ext2fs_rename to use it.  I intend to
adapt msdosfs_rename as well.

I tested this by running

. all the atf tests in src/tests/fs/vfs,
. a more extensive battery of atf tests for rename that I have written
  locally but not committed because atf finds them highly indigestible, 
. dholland's dirconc test, and
. fsck_{ffs,ext2fs} on the result of forcibly interrupting dirconc.

ffs and tmpfs already passed all these tests.  With my changes, they
still pass, and so does ext2fs.  (lfs is broken for other reasons.)

With apologies to the mailing list archive, the patch is at
<http://www.NetBSD.org/~riastradh/tmp/genfs_rename.patch> for your
review before I will consider committing it.  It is pretty big and
hairy (rename is pretty hairy!), and I'm sure I've missed a number of
problems in it even aside from the profusion of XXX's all over it.

Comments?  Questions?


Home | Main Index | Thread Index | Old Index