Re: [RFC][PATCHSET v3] non-recursive pathname resolution & RCU symlinks
From: Al Viro
Date: Fri May 15 2015 - 21:48:30 EST
On Sat, May 16, 2015 at 11:25:03AM +1000, NeilBrown wrote:
> But surely those things can be managed with a spinlock.
>
> I think a big part of the problem is that the VFS tries to control
> filesystems rather than provide services to them.
What with being the thing syscalls talk to for sending the requests to
filesystems... Do you really want to push the pathname resolution into
fs code? You've looked at it lately, right?
> I'm not convinced that serialising 'lookup' calls is vital. If two threads
> find a 'not-validated' dentry, and both try to look up the inode, they
> will both ultimately get the same struct_inode from the icache, and will both
> succeed in connecting it to the dentry. Obviously it would be better to
> avoid two concurrent NFS "LOOKUP" requests, but that is a problem for NFS to
> solve. I suspect that using d_fsdata to point to a pending LOOKUP request
> would allow the "second" thread to wait for that request to finish. Other
> filesystems would take a completely different approach.
See upthread regarding multiple negative dentries with the same name and fun
consequences thereof. There might be _NO_ inode. At all. dcache has a large
negative component and without it you'd get really fucked on NFS as soon
as you try to compile anything. Shitloads of headers, looked up in a lot of
directories. Most of the lookups ending up negative. We really do need that
stuff...
--
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/