Received: by 10.223.176.5 with SMTP id f5csp2475159wra; Mon, 5 Feb 2018 04:50:32 -0800 (PST) X-Google-Smtp-Source: AH8x227IJVB8dWJ17XofX6ZImrX5ZSq33A6lILjC7DG/mK1Mg3R4K9W08Wjez/MPF4qL7MrrOMxS X-Received: by 2002:a17:902:33c1:: with SMTP id b59-v6mr35234362plc.111.1517835032804; Mon, 05 Feb 2018 04:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835032; cv=none; d=google.com; s=arc-20160816; b=N5Hy6c3Y78ZdrtPq+tjQOR5n2wXvB5R76vwsZAP85R2IDnWZUmMlCNXrDkn21LWWJ5 9mZ6vgdPSudoaYhh/gmXdbC7xJkiwJWivTavZ/MhSaWJnDWPh+2vZEhm+udoeYImZqdA +NL7y6u98NMn5/ernsWwj1/3gasYFh0E+zq5+EMEXmBrfc787tUKPcSGYnL5/5I02Etn +V5+m9dXnVREwj2r5V2Bf6PpnW/aE6hpkX//pOc4mDvAqdpqBy1GhyfJAeLW6suc33cw /6TjJnbtJGV+RTehBgM+bP2m9NUKVURYXV09b+k6bpCdRZd4yRSGnHcl33ID9EbwxAte lqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=CcCxDxkvdIgX1/C9NOrsTk4iv/BSK9TVk25QO+lyCZ8=; b=bTe+YQ3yl/4Bo6l0vwdKhEclTWB4MuhNRe2vn7/s5ozqbTybLsNYxRD59+jakLYYoa qHdVyf7//XujZzA48tfQbn1ewGusR/SWnBErEvhF+3YO4Up3FiwHPqZDOm1a9VkeDtoU 7T0P1kGneozHbXRTv0yeou+ateb2zU4yxm/EaM/waP2w+uFHV5aR4WzjmRLPztQQbXcA 73brd+btUs9B1zR7XQHEboksg09HyAi+ukhV2TilApaRDFYbqcXhSC8boPCO8vjWoi1p eSE3+jjIlMoWgnmihkfIO477HDUE+SMA4+dCFA+jv6I0TNmjfKNT3j63d0kBTgASMY7Q cZeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=R3/Enzjb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s14si4825pgf.748.2018.02.05.04.50.18; Mon, 05 Feb 2018 04:50:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=R3/Enzjb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811AbeBEMtY (ORCPT + 99 others); Mon, 5 Feb 2018 07:49:24 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33582 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753159AbeBEMtK (ORCPT ); Mon, 5 Feb 2018 07:49:10 -0500 Received: by mail-wm0-f65.google.com with SMTP id x4-v6so13037852wmc.0 for ; Mon, 05 Feb 2018 04:49:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=CcCxDxkvdIgX1/C9NOrsTk4iv/BSK9TVk25QO+lyCZ8=; b=R3/EnzjbNVSwNrrfZVDRGnsfvmatLLGwSqOc0cKn8Lp6vQggsiGWjwqiGowhyU1ENQ eYgA3C6BxXIFOgm4l8CW5XEOR/5oZYsUjzgRq1quqJvkJvgvaqmqEBcEIoAEuVIV9WrS 2hDrJobcFXTU74fHapa39PP6l7ebZYRoR+1uA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=CcCxDxkvdIgX1/C9NOrsTk4iv/BSK9TVk25QO+lyCZ8=; b=I3e8T78orkbgaYBJuMPiONCq+TtEUPRAuCQ87yJV/FsFhNrAJUYfQmYTl2rbc6cWmr sgYxnfNW1uMV/pp+SkpolciB+IrLEjCGZIWoikVK0nfIv1B4irIUFtRgj+xLyYGvaMsi JphddgSqhJ+7Q/+pvYXzgY/Oe52feRDOHhvk96RVMqOr4rgw2qcJVmA5lQYun8VjgfwM 3o0M2q/L3bZS8Na8+lPikf+FVcnSqLHzzF20RWRj/MdyBTGGSDOz+GIe4WfCEfsqTion cAqexlte7bBwNuF5sfYCqzVutxfYpjpxyBwbL2NiDm0RiY296LvFqDdi3sXd6mPOBfnx Bg6g== X-Gm-Message-State: AKwxytdrUPMrdJqg/d32+NrGQ3GCSsB7D2nhZEVrJziv4AzNE4zN2b0K ttKL3x464NDts3mhveaEX87m/A== X-Received: by 10.28.10.206 with SMTP id 197mr34343989wmk.61.1517834949284; Mon, 05 Feb 2018 04:49:09 -0800 (PST) Received: from veci.piliscsaba.redhat.com (C2B0E321.catv.pool.telekom.hu. [194.176.227.33]) by smtp.gmail.com with ESMTPSA id w133sm6409029wmg.5.2018.02.05.04.49.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Feb 2018 04:49:08 -0800 (PST) Date: Mon, 5 Feb 2018 13:49:02 +0100 From: Miklos Szeredi To: Linus Torvalds Cc: Al Viro , Amir Goldstein , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: [GIT PULL] overlayfs update for 4.16 Message-ID: <20180205124902.GA19579@veci.piliscsaba.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-linus This work from Amir adds NFS export capability to overlayfs. NFS exporting an overlay filesystem is a challange because we want to keep track of any copy-up of a file or directory between encoding the file handle and decoding it. This is achieved by indexing copied up objects by lower layer file handle. The index is already used for hard links, this patchset extends the use to NFS file handle decoding. There's a VFS patch that splits out d_instantiate_anon() from d_obtain_alias(). This is needed because overlayfs allocates d_fsdata for its dentries, so the plain d_alloc_anon() call in d_obtain_alias() is not sufficient to create a fully initialized overlay dentry. The patch conflicts with f1ee616214cb ("VFS: don't keep disconnected dentries on d_anon"); fixup by "s/tmp/dentry/g" on the upstream version. Thanks, Miklos --- Amir Goldstein (50): ovl: hash directory inodes for fsnotify ovl: fix failure to fsync lower dir ovl: take lower dir inode mutex outside upper sb_writers lock ovl: fix another overlay: warning prefix ovl: take mnt_want_write() for work/index dir setup ovl: take mnt_want_write() for removing impure xattr ovl: fix inconsistent d_ino for legacy merge dir ovl: disable index when no xattr support ovl: force r/o mount when index dir creation fails ovl: store layer index in ovl_layer ovl: factor out ovl_check_origin_fh() ovl: simplify arguments to ovl_check_origin_fh() ovl: generalize ovl_verify_origin() and helpers ovl: update documentation of inodes index feature ovl: add support for "nfs_export" configuration ovl: verify stored origin fh matches lower dir ovl: unbless lower st_ino of unverified origin ovl: use directory index entries for consistency verification ovl: verify whiteout index entries on mount ovl: verify directory index entries on mount ovl: cleanup temp index entries ovl: create ovl_need_index() helper ovl: index all non-dir on copy up for NFS export ovl: index directories on copy up for NFS export ovl: cleanup dir index when dir nlink drops to zero ovl: whiteout index when union nlink drops to zero ovl: whiteout orphan index entries on mount ovl: factor out ovl_get_index_fh() helper ovl: do not pass overlay dentry to ovl_get_inode() ovl: use d_splice_alias() in place of d_add() in lookup ovl: copy up of disconnected dentries ovl: store 'has_upper' and 'opaque' as bit flags ovl: document NFS export ovl: encode pure upper file handles ovl: decode pure upper file handles ovl: decode connected upper dir file handles ovl: encode non-indexed upper file handles ovl: copy up before encoding non-connectable dir file handle ovl: encode lower file handles ovl: decode lower non-dir file handles ovl: decode indexed non-dir file handles ovl: decode lower file handles of unlinked but open files ovl: decode indexed dir file handles ovl: decode pure lower dir file handles ovl: hash non-indexed dir by upper inode for NFS export ovl: lookup connected ancestor of dir in inode cache ovl: lookup indexed ancestor of lower dir ovl: wire up NFS export operations ovl: fix regression in fsnotify of overlay merge dir ovl: check ERR_PTR() return value from ovl_encode_fh() Miklos Szeredi (1): vfs: factor out helpers d_instantiate_anon() and d_alloc_anon() --- Documentation/filesystems/overlayfs.txt | 106 ++++- fs/dcache.c | 88 ++-- fs/overlayfs/Kconfig | 31 +- fs/overlayfs/Makefile | 3 +- fs/overlayfs/copy_up.c | 188 +++++++-- fs/overlayfs/dir.c | 175 ++++---- fs/overlayfs/export.c | 715 ++++++++++++++++++++++++++++++++ fs/overlayfs/inode.c | 106 +++-- fs/overlayfs/namei.c | 533 +++++++++++++++++------- fs/overlayfs/overlayfs.h | 66 ++- fs/overlayfs/ovl_entry.h | 11 +- fs/overlayfs/readdir.c | 57 ++- fs/overlayfs/super.c | 125 ++++-- fs/overlayfs/util.c | 108 +++-- include/linux/dcache.h | 2 + 15 files changed, 1905 insertions(+), 409 deletions(-) create mode 100644 fs/overlayfs/export.c