[[email address for Nick Piggin changed to npiggin@kernel.dk]]
On Fri, 20 Aug 2010 12:51:35 +0100
Al Viro <viro@ZenIV.linux.org.uk> wrote:
So as I understand it you aren't rejecting the concept in principle, but you
believe non-trivial code review is required before it can be considered an
acceptable change?
That's quite reasonable. I hope to find time to have a look at the code.
Fair comment, and while one could imagine ways around this (such as requiring
some Capability to link an fd) they wouldn't be very elegant.
But then nor is inventing a pile of new syscalls for doing different things
with handles such as the list Aneesh posted.
Maybe a different approach is needed.
How about a new AT flag: AT_FILE_HANDLE
Meaning is that the 'dirfd' is used only to identify a filesystem (vfsmnt) and
the 'name' pointer actually points to a filehandle fragment interpreted in
that filesystem.
One problem is that there is no way to pass the length...
Options:
fragment is at most 64 bytes nul padded at the end
fragment is hex encoded and nul terminated
??
I think I prefer the hex encoding, but I'm hoping someone else has a better
idea.
NeilBrown
--