From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936086AbdEWIml (ORCPT ); Tue, 23 May 2017 04:42:41 -0400 Received: from b.ns.miles-group.at ([95.130.255.144]:44725 "EHLO radon.swed.at" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933976AbdEWImg (ORCPT ); Tue, 23 May 2017 04:42:36 -0400 Subject: Re: [PATCH 4/6] ubifs: Maintain a parent pointer To: Christoph Hellwig References: <1495398051-4604-1-git-send-email-richard@nod.at> <1495398051-4604-5-git-send-email-richard@nod.at> <20170523083758.GB4107@infradead.org> Cc: linux-mtd@lists.infradead.org, david@sigma-star.at, dedekind1@gmail.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, adilger.kernel@dilger.ca, akpm@linux-foundation.org, linux-ext4@vger.kernel.org, bfields@redhat.com, marcus.folkesson@gmail.com, hyc.lee@gmail.com, rockdotlee@gmail.com, leon.pollak@gmail.com From: Richard Weinberger Message-ID: <99b3f295-be4e-14a1-a21d-e9055949a8ef@nod.at> Date: Tue, 23 May 2017 10:42:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170523083758.GB4107@infradead.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christoph, Am 23.05.2017 um 10:37 schrieb Christoph Hellwig: > On Sun, May 21, 2017 at 10:20:49PM +0200, Richard Weinberger wrote: >> The new feature UBIFS_FLG_PARENTPOINTER allows looking >> up the parent. Usually the Linux VFS walks down the filesystem >> and no parent pointers are needed. But when a filesystem >> is exportable via NFS such a lookup is needed. >> We can use a padding field in struct ubifs_ino_node to >> maintain a pointer to the parent inode. > > Note that nfsd/exportfs will only do this for directories, and beacause > we hardlinks for other objects that is an important distinction. > > I think the ubifs code should make sure to only maintain the parent > pointers for directories, otherwise confusion and abuses will happen. Thanks for the info, I'll massage the code in that direction. Thanks, //richard