Re: [RFC PATCH] file as directory



On Wed, May 23, 2007 at 11:03:08AM +0200, Miklos Szeredi wrote:
I still don't get it where the superblock comes in. The locking is
"interesting" in there, yes. And I haven't completely convinced
myself it's right, let alone something that won't easily be screwed up
in the future. So there's definitely room for thought there.

But how does it matter if two different paths have the same sb or a
different sb mounted over them?

Because then you get a slew of fun issues with dropping the final reference
to vfsmount vs. lookup on another place. What hold do you have on that
superblock and when do you switch from "oh, called ->enter() on the same
inode again, return vfsmount over the same superblock" to "need to
initialize that damn superblock, all mounts are gone"?

The same dentry is mounted over each one. The contents of the
directory should only depend on the contents of the underlying inode.
The path leading up to it is completely irrelevant.

So what kind of exclusion do you have for ->enter()? None?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH 20/20] honor r/w changes at do_remount() time
    ... This is the core of the read-only bind mount patch set. ... of filesystem and add a "if a flag is set, act upon vfsmount". ... We have a number of vfsmounts over given superblock. ... So "can we remount superblock ro?" ...
    (Linux-Kernel)
  • Re: [PATCH 20/20] honor r/w changes at do_remount() time
    ... This is the core of the read-only bind mount patch set. ... of filesystem and add a "if a flag is set, act upon vfsmount". ... but then we'd better decide what rw superblock *is*. ... So "can we remount superblock ro?" ...
    (Linux-Kernel)
  • [RFC][PATCH 4/4] check mount writers at superblock remount
    ... mounts that might allow writes to a superblock. ... mounts in the superblock, but I think this is much simpler. ... +void unlock_mnt_writers ... void free_vfsmnt(struct vfsmount *mnt) ...
    (Linux-Kernel)
  • Re: [PATCH -mm 5/7] add user namespace
    ... for efficiency and other reasons I don't entirely understand), the situation is worse: A mount of server:/foo/bar on / in the bar virtual machine may get its superblock merged with a mount of server:/ foo/baz on / in the baz virtual machine. ... If it's efficient to merge those superblocks we should, and once again it's necessary to tie the UID namespace to the vfsmount, not the superblock. ...
    (Linux-Kernel)
  • Re: [PATCH 06/28] reintroduce list of vfsmounts over superblock
    ... writing to r/o filesystems from the superblock into the ... introduce a list of vfsmounts hanging off the superblock. ... We really need to keep is someone writing ... to this vfsmount counters in addition to is someone writing to this sb. ...
    (Linux-Kernel)