[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyS9VYT50JAXeGrLrtFVWSGr+DMTA1hhrcPYzmjrSV5+A@mail.gmail.com>
Date: Sun, 29 Apr 2012 00:19:50 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Michael Tokarev <mjt@....msk.ru>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Thomas Meyer <thomas@...3r.de>,
David Miller <davem@...emloft.net>,
linux-kernel@...r.kernel.org, autofs@...r.kernel.org,
raven@...maw.net, stable@...nel.org
Subject: Re: [PATCH v2] Introduce a version6 of autofs interface, to fix
design error.
On Sat, Apr 28, 2012 at 11:37 PM, Michael Tokarev <mjt@....msk.ru> wrote:
>
> 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?
Gaah, it should, but it won't.
I bet my original patch worked fine, because the pipe has only one
inode and pipe structure. But it has *two* 'struct file's associated
with it, and autofs only ever sees the writing side, and never gets to
mark the reading side O_DIRECT. So yeah, the reading side won't do the
proper packetized read.
Duh. So we need to put the flag back in the pipe_inode_info. Too bad -
because the O_DIRECT approach was so nice in other ways.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists