From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH resend] vfs: Add ->statfs callback for pipefs Date: Wed, 24 Aug 2011 01:23:28 -0700 Message-ID: <20110824012328.f7bfc68a.akpm@linux-foundation.org> References: <20110824080924.GG29452@sun> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Al Viro , James Bottomley , Tejun Heo , Glauber Costa , containers@lists.osdl.org, linux-kernel@vger.kernel.org, Pavel Emelyanov , Serge Hallyn , Nathan Lynch , Oren Laadan , Daniel Lezcano , LINUXFS-ML To: Cyrill Gorcunov Return-path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:51127 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754509Ab1HXIVm (ORCPT ); Wed, 24 Aug 2011 04:21:42 -0400 In-Reply-To: <20110824080924.GG29452@sun> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 24 Aug 2011 12:09:24 +0400 Cyrill Gorcunov wrote: > From: Pavel Emelyanov > > This is done to make it possible to distinguish pipes > from fifos when opening one via /proc//fd/ link. > > Signed-off-by: Pavel Emelyanov > Reviewed-by: Tejun Heo > Acked-by: Serge Hallyn > Signed-off-by: Cyrill Gorcunov > --- > fs/pipe.c | 1 + > 1 file changed, 1 insertion(+) > > Any objections to this one? It was a part of a patchset > but can be treated independently so I'm re-sending it alone. > > Index: linux-2.6.git/fs/pipe.c > =================================================================== > --- linux-2.6.git.orig/fs/pipe.c > +++ linux-2.6.git/fs/pipe.c > @@ -1254,6 +1254,7 @@ out: > > static const struct super_operations pipefs_ops = { > .destroy_inode = free_inode_nonrcu, > + .statfs = simple_statfs, > }; > > /* OK, I give up - how does it work? So it appears that the statfs call would previously return -ENOSYS, but with this change the statfs will succeed and userspace can then inspect f_type. Yes? I will fix your changelog by adding a description along these lines. And I'll ask you to fix it further by telling us why we want to do this? The kernel has had this issue for a long time - why does it now matter?