Re: [RFC PATCH] file as directory



On Wed, May 23, 2007 at 10:05:21AM +0200, Miklos Szeredi wrote:
Er... These mounts might not be propagated, but what about a bind
over another instance of such file in master tree?

So your question is, which mount takes priority on the lookup? It
probably should be the propagated real mount, rather than the
dir-on-file one, shouldn't it?

There might be dragons in that area...

I think they should be the same superblock, same dentry. What would
be the advantage of doing otherwise?

Then you are going to have interesting time with locking in final mntput().

Final mntput of what?

When the last reference to your mount goes away.

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?

BTW, what about having several links to the same file? You have i_mutex
on the inode, so serialization of those is not a problem, but...

Sorry, I lost it...

Say /foo/bar/a is such a file.

cd /foo/bar
ln a b

now do lookups on a/ and b/

What happens?

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.

Miklos
-
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: Mounting NFS root FS
    ... Locking depends on persistent storage, ... And can't have locks without the mount. ... The nfsmount which is in the klibc distribution supports running an ad hoc portmap daemon, which allows locking to be done by forwarding information to the "real" portmap for when the real rpc.statd is run. ...
    (Linux-Kernel)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: Mounting NFS root FS
    ... Locking depends on persistent storage, ... Except for the fact that to be able to mount anything RW you ... generally _want_ to have locks. ...
    (Linux-Kernel)
  • Re: NFS-Filelocking: FreeBSD vs. Linux
    ... Auch ohne Locking hängt sich die NFS-Verbindung noch manchmal weg bzw. scheitert bereits beim Mount. ... Einmal hatte ich sogar den kuriosen Zustand, daß der Server keine Verzeichnisse mehr exportiert hat, obwohl alles korrekt in exports eingetragen war. ...
    (de.comp.os.unix.bsd)
  • Re: Reproducible panic of 6.2 on double mount ntfs
    ... Jan Henrik Sylvester wrote: ... panic: lockmgr: locking against myself ... Since I should be able to avoid issuing repeated execution of mount with some concentration, it should not be too much of an issue for me, either... ...
    (freebsd-questions)