From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miklos Szeredi Subject: Re: [PATCH v2 03/17] ovl: decode pure upper file handles Date: Wed, 24 Jan 2018 11:34:03 +0100 Message-ID: References: <1515086449-26563-1-git-send-email-amir73il@gmail.com> <1515086449-26563-4-git-send-email-amir73il@gmail.com> <20180119103952.GA24104@veci.piliscsaba.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:34904 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932887AbeAXKeE (ORCPT ); Wed, 24 Jan 2018 05:34:04 -0500 Received: by mail-qt0-f195.google.com with SMTP id g14so9039005qti.2 for ; Wed, 24 Jan 2018 02:34:04 -0800 (PST) In-Reply-To: Sender: linux-unionfs-owner@vger.kernel.org List-Id: linux-unionfs@vger.kernel.org To: Amir Goldstein Cc: overlayfs , linux-fsdevel , Al Viro On Fri, Jan 19, 2018 at 9:10 PM, Amir Goldstein wrote: > On Fri, Jan 19, 2018 at 1:07 PM, Amir Goldstein wrote: >> On Fri, Jan 19, 2018 at 12:39 PM, Miklos Szeredi wrote: >>> On Fri, Jan 19, 2018 at 02:23:35AM +0200, Amir Goldstein wrote: >>>> > How is this for an option? >>> [...] >>>> > +struct dentry *d_obtain_alias_fsdata(struct inode *inode, void **fsdata) >>>> > +{ >>>> > + return __d_obtain_alias(inode, 1, fsdata); >>>> > } >>>> > EXPORT_SYMBOL(d_obtain_alias); >>> >>> It would work, but I like this interface better: >>> >>> +extern struct dentry * d_alloc_anon(struct super_block *); >>> +extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *); >>> >> >> OK. Thanks for the patch! >> > > Added your dcache patch to the series and reworked my patches > to use the new helpers. > > Tested result is pushed to: > https://github.com/amir73il/linux/commits/ovl-nfs-export-v3 > > Prep patches changes since v2: > - Rebased over fix patch "hash all directory inodes for fsnotify" > - Rename mount/config option from "verify" to "nfs_export" > - Force r/o mount when index dir creation fails > - Allow enabling "nfs_export" for non-upper mount > - Require "redirect_dir=nofollow" for non-upper mount > - Rename dir index entries xattr from ".origin" to ".upper" > - Re-factor ovl_{get|set|verify}_origin() helpers > - Simplify test for temp index name (starts with #) > - Abandon ovl_dentry_is_renamed() test for lower st_ino > - Document overhead on mount with full index > - Document change of behavior when verifying lower origin > - Added patch to make room in ovl_entry struct > > NFS export changes since v2: > - Fix exportfs ops for r/o overlay with no upperdir > - Document reason for copy up directory on encode > - Take care of racing with rename while connecting dir > - Explain the reasons for choosing the 'connected' dir approach > - Do not add dentry without ovl_entry to dcache > > Optimizations TODO: > - Copy up on encode only when lower ancestor is below middle layer redirect > - Hash inode by fh to avoid origin decode of whiteout fh > > As far as I know, the series is now functionally correct and all comments > so far addressed. The remaining optimizations will be done on top of this > series. Pushed to overlayfs-next with one fix (do not warn about falling back to nfs_export=off if nfs_export is already off). That spurious warning makes me wonder: how much of the option matrix is tested? Thanks, Miklos