From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: ext3 and like, mount point in module Date: Wed, 05 Aug 2015 12:17:06 -0500 Message-ID: <87a8u5venh.fsf@x220.int.ebiederm.org> References: <55BCC935.2000908@nod.at> Mime-Version: 1.0 Content-Type: text/plain Cc: Richard Weinberger , "linux-fsdevel\@vger.kernel.org" To: Tomas Bortoli Return-path: Received: from out01.mta.xmission.com ([166.70.13.231]:53213 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736AbbHERXs (ORCPT ); Wed, 5 Aug 2015 13:23:48 -0400 In-Reply-To: (Tomas Bortoli's message of "Sat, 1 Aug 2015 16:34:17 +0200") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Tomas Bortoli writes: >> What about chroot/namespaces/etc? :) > > I think chroot would work even so. Why would a program call chroot("..") on the root dir of the root fs? > It's unnecessary and tricky. A local program has all the information to know relative paths and move consequently. > Anyway it is possible. > > >> I'm not sure if it is worth the hassle, I bet some applications depend on that behavior. >> But you can give it a try, I'd insert a negative dentry for ".." if ".." is child of the current >> root. > > If with negative dentry you mean not putting ".." I've understood. > But, ".." is needed for file system mounted not on the root point, otherwise they would be disconnected from the "parent" fs. > So, the "mount_point" variable is needed and it is not present in the file system module itself, as you said. > Where can I find the vfs module? > And, If I've understood what Al Viro said, it's correct to work on vfs rather than on the specific file system module. fs/namei.c follow_dotdot and follow_dotdot_rcu You might also take a gander at the patches I have recently posted that address a similiar but different issue with .. and bind mounts. That should at least show you where the code is. Eric