In message <20080424124245.GC15214@ZenIV.linux.org.uk>, Al Viro writes:
I tend to agree that the mnt_want* bracketing may need to encompass more
than one vfs_* method. When copyup is involved, the problem is only
exacerbated. A copyup may want to perform several actions "atomically", for
example:
1. vfs_mkdir /a
2. vfs_mkdir /a/b
3. vfs_mkdir /a/b/c
4. vfs_create /a/b/c/f
5. vfs_read(source file) -> vfs_write(/a/b/c/f)
These actions are often done in close proximity in unionfs, and in such a
case, it'd be nice if I could want_write only once around this sequence.
However, I'm not sure that for copyup (or ecryptfs), that an vfsmount-level
want/drop write is the right interface. As you pointed out before, Al, some
other mechanism might be needed, perhaps at the superblock level, to declare
one's desire to write the f/s "atomically" (to avoid concurrent topology
changes).
Thanks,
Erez.
--