Re: [PATCH v2] Introduce a version6 of autofs interface, to fix designerror.

From: H. Peter Anvin
Date: Fri Apr 27 2012 - 18:57:07 EST


On 04/27/2012 03:42 PM, Linus Torvalds wrote:
>
> Have you looked at the interface?
>

Yes. I designed and implemented the v1-3 versions of the interface.
v4-5 has kept the pipe, but at least v5 dropped the reading of the
header with the included length as a separate operation.

> The file descriptor is created in user space, and is defined to be a
> pipe. So both automount and systemd create a pipe, and then pass that
> pipe fd to the mount system call.
>
> So it is not autofs that creates the file descriptor for the user.
> It's the other way around: the user creates (using "pipe()") the file
> descriptor, and passes it to autofs.

I would have used SOCK_SEQPACKET if it had existed today, and so if
there is going to be a change in the interface I would use it.

I guess, though, what you're saying is to change the semantic of the
existing pipe to return short reads on the receive end. That won't work
since the daemon code is written to loop back and read more if it
doesn't fill the buffer, so it "swallows the comma." Hence it's a new
interface no matter how you slice it.

-hpa


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