From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Kent Subject: Re: [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() [ver #2] Date: Mon, 26 Jul 2010 23:22:48 +0800 Message-ID: <1280157768.3569.14.camel@localhost> References: <1279944664.2944.8.camel@localhost> <20100722175847.5552.11520.stgit@warthog.procyon.org.uk> <17723.1279897759@redhat.com> <9168.1280153997@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-afs-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: David Howells Return-path: In-Reply-To: <9168.1280153997-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Mon, 2010-07-26 at 15:19 +0100, David Howells wrote: > Ian Kent wrote: > > > > (4) Stops pathwalk at the automount point and returns that point in the fs > > > tree if it decides not to automount rather than reporting ELOOP (see its > > > use of EXDEV for this). > > Does it make autofs easier if d_op->d_automount() is allowed to return -EXDEV > to request this? Then you can return it in Oz mode to allow the daemon to > see/use the underlying mountpoint without recursing back into d_automount(). Yes, it's really useful. > > Ideally, the daemon would use AT_NO_AUTOMOUNT, but there's no way to pass that > to sys_mount() or sys_umount(). The use of EXDEV, and if we had a way of saying we want a negative dentry to trigger a mount, allows this mechanism to work for autofs without any user space changes for direct and indirect mounts, at least to match the current function. Having said that though I've only just begun to test the various cases. I know this was originally meant to deal with just the follow_link abuse but the approach as it is appears to be able to resolve a long standing deadlock bug autofs has with indirect mounts and affords a huge amount of simplification to the autofs module code. I really hope we can work out a suitable way to change the implementation to allow for negative dentrys to trigger mounts. Of course it's quite possible I'll hit a snag during testing but I hope not as I've spent a lot of time on alternate approaches in the last few years. Ian From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752Ab0GZPXG (ORCPT ); Mon, 26 Jul 2010 11:23:06 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:48823 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754396Ab0GZPXA (ORCPT ); Mon, 26 Jul 2010 11:23:00 -0400 X-Sasl-enc: FgoQKJ+HuaeSoaSZVVZUc4hyWKAsWk+7RBfCPFfgqq1J 1280157776 Subject: Re: [PATCH 1/6] Add a dentry op to handle automounting rather than abusing follow_link() [ver #2] From: Ian Kent To: David Howells Cc: viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <9168.1280153997@redhat.com> References: <1279944664.2944.8.camel@localhost> <20100722175847.5552.11520.stgit@warthog.procyon.org.uk> <17723.1279897759@redhat.com> <9168.1280153997@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 26 Jul 2010 23:22:48 +0800 Message-ID: <1280157768.3569.14.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2010-07-26 at 15:19 +0100, David Howells wrote: > Ian Kent wrote: > > > > (4) Stops pathwalk at the automount point and returns that point in the fs > > > tree if it decides not to automount rather than reporting ELOOP (see its > > > use of EXDEV for this). > > Does it make autofs easier if d_op->d_automount() is allowed to return -EXDEV > to request this? Then you can return it in Oz mode to allow the daemon to > see/use the underlying mountpoint without recursing back into d_automount(). Yes, it's really useful. > > Ideally, the daemon would use AT_NO_AUTOMOUNT, but there's no way to pass that > to sys_mount() or sys_umount(). The use of EXDEV, and if we had a way of saying we want a negative dentry to trigger a mount, allows this mechanism to work for autofs without any user space changes for direct and indirect mounts, at least to match the current function. Having said that though I've only just begun to test the various cases. I know this was originally meant to deal with just the follow_link abuse but the approach as it is appears to be able to resolve a long standing deadlock bug autofs has with indirect mounts and affords a huge amount of simplification to the autofs module code. I really hope we can work out a suitable way to change the implementation to allow for negative dentrys to trigger mounts. Of course it's quite possible I'll hit a snag during testing but I hope not as I've spent a lot of time on alternate approaches in the last few years. Ian