From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josef Bacik Subject: Re: [PATCH] fuse: return -EAGAIN if the connection has not been init'ed Date: Fri, 13 Nov 2009 09:26:30 -0500 Message-ID: <20091113142629.GA26371@localhost.localdomain> References: <20091112210125.GE4920@dhcp231-156.rdu.redhat.com> <1258118085.5040.46.camel@dhcp231-106.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eric Paris , josef@redhat.com, fuse-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org To: Miklos Szeredi Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbZKMO0s (ORCPT ); Fri, 13 Nov 2009 09:26:48 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 13, 2009 at 02:55:24PM +0100, Miklos Szeredi wrote: > On Fri, 13 Nov 2009, Eric Paris wrote: > > mount S ffff88001f86bd28 0 4126 4120 0x00000080 > > mount S ffff88001f86bd28 0 4126 4120 0x00000080 > > ffff88001f86bc38 0000000000000086 0000000000000011 ffff88001f86bc08 > > 0000000000000700 0000000000000000 0000000000000013 ffffffff815884cd > > ffff8800377532c8 000000000000f8e0 ffff8800377532c8 0000000000015600 > > Call Trace: > > [] fuse_get_req+0xb8/0x15b [fuse] > > [] fuse_getxattr+0x58/0x14f [fuse] > > [] get_vfs_caps_from_disk+0x52/0xcd > > [] audit_copy_inode+0x83/0xb1 > > [] __audit_inode+0x1ee/0x1fd > > [] audit_inode+0x28/0x2a > > [] do_path_lookup+0x63/0x8b > > [] user_path_at+0x56/0x93 > > [] sys_readlinkat+0x2d/0x91 > > [] sys_readlink+0x1b/0x1d > > [] system_call_fastpath+0x16/0x1b > > > > Userspace called readlink() and the audit system (after the vfs worked > > out the path) needs to collect any fcaps. > > OK, this is a different problem than what I thought. Agreed, audit is > not doing anything wrong here. > > The cause seems to be that fuse calls "mount -i -f ..." to add the > filesystem entry to /etc/mtab. mount(8) then goes off and tries to > canonicalize the path, calling readlink() on the mountpoint. Which is > unnecessary, really. The path has already been canonicalized, but > unfortunately there's no way currently to tell this to mount. > > In this light, the patch by Josef might be OK as a workaround, but > I'll look at better ways to fix this. > > Josef, can you check whether the mtab is still correctly updated with > your patch? > Yes mtab is correctly updated with my patch. Like I said I'm open to other options, this just happened to fix it and I figured I'd send it along to help illustrate the problem hoping you had a better idea :). Thanks, Josef