[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxoGXgVhPyU6ObOnowpCNVYCyaVeFswLx_vJ3c4KBf3yw@mail.gmail.com>
Date: Fri, 27 Apr 2012 15:49:32 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: David Miller <davem@...emloft.net>, mjt@....msk.ru,
linux-kernel@...r.kernel.org, autofs@...r.kernel.org,
raven@...maw.net, thomas@...3r.de, stable@...nel.org
Subject: Re: [PATCH v2] Introduce a version6 of autofs interface, to fix
design error.
On Fri, Apr 27, 2012 at 3:42 PM, Alan Cox <alan@...rguk.ukuu.org.uk> wrote:
>> Comments? The patch looks fairly simple. The "packetized pipe" might
>> even be useful for other users and maybe we might want to expose it as
>> an actual pipe fcntl, but right now the only thing that sets that flag
>> is autofs.
>
> The obvious way to set the flag would seem to me to also btake O_DIRECT
> on the pipe as meaning this ?
Hmm. That would work, then if you wanted to create a packet pipe, you'd just use
if (pipe2(fd, O_DIRECT | O_NONBLOCK)) {
perror("Kernel doesn't support packetized pipes");
return -1;
}
which means that if user space wants to use packetized pipes for other
things, it now has a nice way of testing whether the kernel supports
it (because older kernels would return -EINVAL - for once we actually
verify that only the flags we support are set).
And that maybe we wouldn't even need the extra flag in the "struct
pipe" at all - we could just check it in file->f_flags.
Let my try that.
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