From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [patch 1/2] getattr - fill the size of pipes Date: Thu, 4 Oct 2007 16:22:52 -0700 Message-ID: <20071004162252.f0785c9f.akpm@linux-foundation.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, dada1@cosmosbay.com, linux-fsdevel@vger.kernel.org To: Jan Engelhardt Return-path: Received: from smtp2.linux-foundation.org ([207.189.120.14]:44287 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978AbXJDXYP (ORCPT ); Thu, 4 Oct 2007 19:24:15 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2 Oct 2007 19:54:53 +0200 (CEST) Jan Engelhardt wrote: > [PATCH]: Fill the size of pipes > > Instead of reporting 0 in size when stating() a pipe, we give the number of > queued bytes. This might avoid using ioctl(FIONREAD) to get this information. > > References and derived from: http://lkml.org/lkml/2007/4/2/138 > Cc: Eric Dumazet > Signed-off-by: Jan Engelhardt Cute feature, but it is (I assume) a Linux-specific extension and is something which we'll need to maintain for ever and it invites unportability to older Linuxes and other OSes and it introduces some risk of breakage of existing applications. And it slows down fstat on a pipe. Given that the info can already be obtained via ioctl(FIONREAD) anyway, I don't think that (gain > pain)?