From owner-freebsd-arch@FreeBSD.ORG Tue Jan 31 21:49:03 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 2C54C106566C; Tue, 31 Jan 2012 21:49:03 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qw0-f47.google.com (mail-qw0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 99C258FC0A; Tue, 31 Jan 2012 21:49:02 +0000 (UTC) Received: by qadz30 with SMTP id z30so3519592qad.13 for ; Tue, 31 Jan 2012 13:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Qv7W0pKN0Qf+bbryD8C9uoei1PbZ/Vx9NKUeiCzcdpA=; b=s9vTKfAX/HQP7bJFmIQt/eJuca9pIQH0hv/Gj8wS8+sruuWFNC/Ckz99Px4MS2Zusi rqfWuvyiQcJ64KtVuc6CIPX42u/nJiCQBBziOhrTxBmHElzghFEMSnftk14zGtNCKa2B 4JF1GSSPD+jdLXoLwvqbPJrhKaxIZve5Xs374= MIME-Version: 1.0 Received: by 10.224.182.147 with SMTP id cc19mr17398896qab.76.1328046540966; Tue, 31 Jan 2012 13:49:00 -0800 (PST) Sender: giovanni.trematerra@gmail.com Received: by 10.229.81.200 with HTTP; Tue, 31 Jan 2012 13:49:00 -0800 (PST) In-Reply-To: <20120128233712.GA92694@stack.nl> References: <20120110005155.S2378@besplex.bde.org> <20120110153807.H943@besplex.bde.org> <20120128233712.GA92694@stack.nl> Date: Tue, 31 Jan 2012 22:49:00 +0100 X-Google-Sender-Auth: z1P4qkCvEliqSLxENK7NxSkPt9E Message-ID: From: Giovanni Trematerra To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 31 Jan 2012 21:49:03 -0000 On Sun, Jan 29, 2012 at 12:37 AM, Jilles Tjoelker wrote: > 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. > Hi Jilles, thanks a lot for looking at the patch. I'll fix the issue in a new version of the patch. -- Gianni