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

Michael Tokarev
2012-04-29T06:37:07Z

On 28.04.2012 20:10, Linus Torvalds wrote:
> On Fri, Apr 27, 2012 at 4:27 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> The attached patch implements that, and makes autofs automatically set
>> the O_DIRECT flag.
>
> Ok, since the packetized pipe approach makes the "compat" games in
> autofs unnecessary (autofs can just always do the bigger write), I
> have now reverted the commit that started this issue in my tree (and
> marked it for stable). So automount should work again.
>
> However, I would still like to know if systemd works with the attached
> patch (it's pretty much the same patch as before, but the revert made
> for some changes in the autofs code).
>
> Thomas?

I installed 32bit userspace together with systemd in a vrtual machine
today, and tried it with this patch (and with the previous autofs
'fix' reverted).

And no, it does not quite work. Strace shows that systemd correctly
reads first 300 bytes, but next read returns 4 bytes, so it reads
these and waits for next 300-4 = 296 bytes of data.

/proc/1/fdinfo/16 -- the autofs pipe fd# -- shows flags=02004000
which is O_CLOEXEC|O_NONBLOCK, but this is the other end of the
pipe.. shouldn't the READ side of the pipe have O_DIRECT flag now?

Thanks,

/mjt