From owner-freebsd-arch@FreeBSD.ORG Sat Jan 28 23:37:15 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6D2D1065782; Sat, 28 Jan 2012 23:37:15 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 0BB568FC15; Sat, 28 Jan 2012 23:37:15 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 27FB71DFD42; Sun, 29 Jan 2012 00:37:13 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 0E04E28468; Sun, 29 Jan 2012 00:37:13 +0100 (CET) Date: Sun, 29 Jan 2012 00:37:12 +0100 From: Jilles Tjoelker To: Giovanni Trematerra Message-ID: <20120128233712.GA92694@stack.nl> References: <20120110005155.S2378@besplex.bde.org> <20120110153807.H943@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Attilio Rao , flo@freebsd.org, Konstantin Belousov , freebsd-arch@freebsd.org Subject: Re: pipe/fifo code merged. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2012 23:37:15 -0000 On Tue, Jan 17, 2012 at 12:43:19PM +0100, Giovanni Trematerra wrote: > Did you agree that this patch > http://www.trematerra.net/patches/pipefifo_merge2.4.diff > doesn't introduce any further regressions while it fixes > - style bugs you pointed out. > - pipe_stat now use underlying filesystem information for pipes. > - comment about pipeinfo was intended for. > - race into pipe_poll (look at fifo_iseof line). I tested this version of the patch and found that it breaks opening a fifo with O_TRUNC: it fails with [EINVAL]. This appears to be pipe_truncate()'s doing. Previously, truncate requests went to the vnode. In particular, this happens when opening a fifo for writing using sh(1)'s > (unless 'set -C' is in effect) or >| redirection operators. The open properly blocks until a reader arrives but then fails with [EINVAL]. Several tests in tools/regression/bin/sh do this. -- Jilles Tjoelker