Re: [PATCH 1/4] VFS: Add a VFS helper functionvfs_remote_path_lookup()

From: Linus Torvalds
Date: Tue Mar 31 2009 - 18:47:28 EST




On Tue, 31 Mar 2009, Trond Myklebust wrote:
>
> No. The main purpose is to able to look up and walk down an NFSv4 mount
> path, which is a path on the _server_'s file/directory namespace.

Sure, but that's not the "swizzle" part.

If it was just abotu the namespace part, then you'd just do one namespace
per server, and be done with it.

So if you split that function up into a sepate
- allocate namespace for nfsd
- free nfsd namespace
- do the lookup

then really _all_ the extraneous code comes just from that "playing games
with it" swizzling part.

> > And I think it's positively _wrong_ to have a function that creates and
> > destroys the whole "struct fs_struct" and a namespace for just one call.
> > Even if you don't think it's at all performance-critical, the interface is
> > too damn ugly. Have separate "create/destroy context" functions, so that
> > you _can_ do it just once, and have multiple calls in between.
>
> That can probably be done, but the main reason for having the namespace
> was to be able, once the sys_mount() is complete, to garbage collect and
> get rid of those autogenerated mount points that are not user visible.

So there is never any reason to do that nfsd-specific pathwalk at
run-time? There are no "server pwd" requests that clients can do?

Linus
--
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/