From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755023Ab2D3B4t (ORCPT ); Sun, 29 Apr 2012 21:56:49 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:44717 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754314Ab2D3B4s (ORCPT ); Sun, 29 Apr 2012 21:56:48 -0400 MIME-Version: 1.0 In-Reply-To: <1335749398.2281.0.camel@perseus.themaw.net> References: <20120429205429.63CCD7C0064@ra.kernel.org> <4F9DD994.70202@zytor.com> <4F9DDCB6.1070908@zytor.com> <4F9DDE47.5060008@zytor.com> <1335749398.2281.0.camel@perseus.themaw.net> From: Linus Torvalds Date: Sun, 29 Apr 2012 18:56:26 -0700 X-Google-Sender-Auth: B9ZHUYR1mOVW9HWiogzd-Z428_Q Message-ID: Subject: Re: autofs: make the autofsv5 packet file descriptor use a packetized pipe To: Ian Kent Cc: "H. Peter Anvin" , Linux Kernel Mailing List , Michael Tokarev , Alan Cox , Thomas Meyer , autofs@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 29, 2012 at 6:29 PM, Ian Kent wrote: > > autodir looks ok as well. > > http://sourceforge.net/projects/intraperson/files/latest/download That looks odd, but safe. Why does the code make the pipe file descriptor non-blocking, when it then always reads it using that odd "poll_read()" function that does a loop with poll() and read(). I guess there is some 1-second timeout thing. It's a bit odd in other ways too. The "handle_events()" function is passed the fd, but then it never actually uses it, and uses 'autodir.k_pipe' instead. So I'm having a bit of trouble following the *logic* to any of that, but the only reads I found did seem to match the "read whole packet" model, so it does look ok too. Linus