Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3383243imm; Tue, 29 May 2018 06:24:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZougOfsHxWzQd701t0Z8mBVDVvWLlf+jdtn8Q2L4z6PwbEBGsRq2MKf+kj4ba/i0iPAgrtL X-Received: by 2002:a62:8b0a:: with SMTP id j10-v6mr17373630pfe.28.1527600255863; Tue, 29 May 2018 06:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527600255; cv=none; d=google.com; s=arc-20160816; b=l0VZm4A/1hJpntvTdodRD6zvEsLvAycbpJhBbBmtmncGcukh7JcTB5uFW4UIvLIHIe eaAbYcjKsvuY5KgiSV/AypsMEV9B4Pcfz/fWdzxzv1iZnHwwbiu5MCNmLwX55Ak66YQ2 qwbrFG3ro47JL7Zv9WQb3eAMeUiynIT0aTY3ADZSRlPxy06W603zz7y+1CLRsquFU5RA N89Edwrs3UIqHn1flxljqaMyBWvuroRCEZ0v711jGudQ2hZSWomRG44DC86QUuChVP9Q EfEB9Zap60XzGllZe+JXmr4p/kBym0Up3OzQuC8jpATxPXY5oHyh8R92eZ8DdIQINReo B+vw== 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=6Jqf+My1HRMHxKHidckshlozTi3lS1F53cCvwgkne00=; b=PGa1D/NgxM1hD0hUqaa/qUJAGVKQhgnknMt6k+yElnvFMT1dXT1POPr+OxLI4PVdRG M9Bed5cKjMALzRskNjAiuO7VmLC4VIvBJrgMBjt+AC6BrfTUZhQ6qyxtf78pVJNfiykw kFh36pC7Y01zx4Vekw6bnZsPOv/tHlRwTVRaj5DBUYdawgLYekRd2aLfJDF00EHGXdlv NrA9CmW/MRcRB6IxE7Shga9q8AlqrZi8V3hGpn1d2sdzybswqo0WGCt4PVpOYiR0O4tq xdokpAmVoz5jL4JA8try0vvN19/4l0py4bsEvEi9RPmC3fVGQ9bKAWtmlVjR7wkzGbMT 7nIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=JVPtUA+x; 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 c18-v6si6347070pgf.301.2018.05.29.06.24.01; Tue, 29 May 2018 06:24:15 -0700 (PDT) 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=JVPtUA+x; 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 S934716AbeE2NV5 (ORCPT + 99 others); Tue, 29 May 2018 09:21:57 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37572 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934090AbeE2NVx (ORCPT ); Tue, 29 May 2018 09:21:53 -0400 Received: by mail-wr0-f196.google.com with SMTP id i12-v6so25507716wrc.4 for ; Tue, 29 May 2018 06:21:52 -0700 (PDT) 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=6Jqf+My1HRMHxKHidckshlozTi3lS1F53cCvwgkne00=; b=JVPtUA+xGjl7KMKzA7KzUN7tqzDCJFbbOSSgwOxcaB5PE/DP/z/M1XFOhCv2JEcWza ynQ+9uRuYf2GyKV4h77+PMqxpdar1Jcm36u1ZS3vuP3G/K1ujDSZlwVIM3ja6u24vsBb xR2yYaiLxzJteOoICLj+oKZn5gWxPKOCc7rLc= 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=6Jqf+My1HRMHxKHidckshlozTi3lS1F53cCvwgkne00=; b=ca7Ts3gBsyeYJo3xqRxnlCskyr/3OV8Nj0US3S/87ppRk+n54iVpXZRef6LqjhgN17 FX/vppZ/eQJQwXtIAIiIiwa9UyFTl4sD7qI9YlSLNYWX1olghGjecipiASuiqoor0zCI Fy5RFcLBXyrjhB2YybSaQk+Sc6uIK2yaYTWQENeqtScW1RkF2k1ijuGfb0DJ6fPJ2TxE fV1NINlLLxfKZy7IPfEfFP9alLUV2NCo/nsW3yTG22OCoHjDj9CfsLbJlc/nr2BzCwTO SgFYZdB8aoKyiFyBVEsNKC/78InA7C5ZVXeJKNWbKpk0OypXMGc3vHMmel13+H4hK8iZ Qadg== X-Gm-Message-State: ALKqPwdksG8sNzi1vHxKWwKFGnH9hh7fgs0iHj5LD6nAseGWhNOVYabW VglT8GWVGkAM0VaeLrATQK2VkJ4V X-Received: by 2002:adf:e751:: with SMTP id c17-v6mr6678289wrn.143.1527600111579; Tue, 29 May 2018 06:21:51 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-176-63-54-97.catv.broadband.hu. [176.63.54.97]) by smtp.gmail.com with ESMTPSA id u3-v6sm10747200wrm.60.2018.05.29.06.21.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 06:21:50 -0700 (PDT) Date: Tue, 29 May 2018 15:21:48 +0200 From: Miklos Szeredi To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: [GIT PULL] overlayfs update for 4.18 Message-ID: <20180529132148.GC23785@veci.piliscsaba.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Al, I'm sending this pull request to you instead of Linus, because a bigger than usual chunk involves the VFS. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git for-viro This update contains the following: - Deal with vfs_mkdir() not instantiating dentry. - Stack file operations. This solves the ro/rw file descriptor inconsistency, weirdness with ioctl, as well as removing a bunch of overlay specific hacks from the VFS. - Allow metadata-only copy-up when data is unchanged. - Various cleanups in VFS and overlayfs. Thanks, Miklos --- Amir Goldstein (8): ovl: update documentation for unionmount-testsuite ovl: remove WARN_ON() real inode attributes mismatch ovl: strip debug argument from ovl_do_ helpers ovl: struct cattr cleanups ovl: return dentry from ovl_create_real() ovl: create helper ovl_create_temp() ovl: make ovl_create_real() cope with vfs_mkdir() safely ovl: use inode_insert5() to hash a newly created inode Miklos Szeredi (41): ovl: clean up copy-up error paths vfs: factor out inode_insert5() vfs: dedpue: return loff_t vfs: dedupe: rationalize args vfs: dedupe: extract helper for a single dedup vfs: add path_open() vfs: optionally don't account file in nr_files vfs: add f_op->pre_mmap() vfs: export vfs_ioctl() to modules vfs: export vfs_dedupe_file_range_one() to modules ovl: copy up times ovl: copy up inode flags Revert "Revert "ovl: get_write_access() in truncate"" ovl: copy up file size as well ovl: deal with overlay files in ovl_d_real() ovl: stack file ops ovl: add helper to return real file ovl: add ovl_read_iter() ovl: add ovl_write_iter() ovl: add ovl_fsync() ovl: add ovl_mmap() ovl: add ovl_fallocate() ovl: add lsattr/chattr support ovl: add ovl_fiemap() ovl: add O_DIRECT support ovl: add reflink/copyfile/dedup support vfs: don't open real ovl: copy-up on MAP_SHARED ovl: obsolete "check_copy_up" module option ovl: fix documentation of non-standard behavior vfs: simplify dentry_open() Revert "ovl: fix may_write_real() for overlayfs directories" Revert "ovl: don't allow writing ioctl on lower layer" vfs: fix freeze protection in mnt_want_write_file() for overlayfs Revert "ovl: fix relatime for directories" Revert "vfs: update ovl inode before relatime check" Revert "vfs: add flags to d_real()" Revert "vfs: do get_write_access() on upper layer of overlayfs" Partially revert "locks: fix file locking on overlayfs" Revert "fsnotify: support overlayfs" vfs: remove open_flags from d_real() Vivek Goyal (29): ovl: Pass argument to ovl_get_inode() in a structure ovl: Initialize ovl_inode->redirect in ovl_get_inode() ovl: Move the copy up helpers to copy_up.c ovl: Provide a mount option metacopy=on/off for metadata copyup ovl: During copy up, first copy up metadata and then data ovl: Copy up only metadata during copy up where it makes sense ovl: Add helper ovl_already_copied_up() ovl: A new xattr OVL_XATTR_METACOPY for file on upper ovl: Use out_err instead of out_nomem ovl: Modify ovl_lookup() and friends to lookup metacopy dentry ovl: Copy up meta inode data from lowest data inode ovl: Add helper ovl_dentry_lowerdata() to get lower data dentry ovl: Fix ovl_getattr() to get number of blocks from lower ovl: Store lower data inode in ovl_inode ovl: Add helper ovl_inode_realdata() ovl: Open file with data except for the case of fsync ovl: Do not expose metacopy only dentry from d_real() ovl: Move some dir related ovl_lookup_single() code in else block ovl: Check redirects for metacopy files ovl: Treat metacopy dentries as type OVL_PATH_MERGE ovl: Add an inode flag OVL_CONST_INO ovl: Do not set dentry type ORIGIN for broken hardlinks ovl: Set redirect on metacopy files upon rename ovl: Set redirect on upper inode when it is linked ovl: Check redirect on index as well ovl: Disbale metacopy for MAP_SHARED mmap() ovl: Do not do metadata only copy-up for truncate operation ovl: Do not do metacopy only for ioctl modifying file attr ovl: Enable metadata only feature --- Documentation/filesystems/Locking | 4 +- Documentation/filesystems/overlayfs.txt | 97 ++++-- Documentation/filesystems/vfs.txt | 19 +- fs/btrfs/ctree.h | 5 +- fs/btrfs/ioctl.c | 7 +- fs/file_table.c | 13 +- fs/inode.c | 210 +++++-------- fs/internal.h | 17 +- fs/ioctl.c | 1 + fs/locks.c | 20 +- fs/namei.c | 2 +- fs/namespace.c | 69 +---- fs/ocfs2/file.c | 10 +- fs/open.c | 74 ++--- fs/overlayfs/Kconfig | 40 +++ fs/overlayfs/Makefile | 4 +- fs/overlayfs/copy_up.c | 273 +++++++++------- fs/overlayfs/dir.c | 312 +++++++++++++------ fs/overlayfs/export.c | 11 +- fs/overlayfs/file.c | 530 ++++++++++++++++++++++++++++++++ fs/overlayfs/inode.c | 203 ++++++++---- fs/overlayfs/namei.c | 205 +++++++----- fs/overlayfs/overlayfs.h | 119 ++++--- fs/overlayfs/ovl_entry.h | 7 +- fs/overlayfs/super.c | 134 +++++--- fs/overlayfs/util.c | 252 ++++++++++++++- fs/read_write.c | 91 +++--- fs/xattr.c | 9 +- fs/xfs/xfs_file.c | 8 +- include/linux/dcache.h | 15 +- include/linux/fs.h | 36 ++- include/linux/fsnotify.h | 14 +- include/uapi/linux/fs.h | 1 - mm/util.c | 5 + 34 files changed, 1981 insertions(+), 836 deletions(-) create mode 100644 fs/overlayfs/file.c