Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp69249imm; Tue, 21 Aug 2018 14:46:44 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwRyL2OWggsvyoVHU3byp8IXMVcktI0UX+NBdo3Hk7NvigD54q5/OSBmlqed762XdRi4g3E X-Received: by 2002:a17:902:e088:: with SMTP id cb8-v6mr51616093plb.189.1534888003976; Tue, 21 Aug 2018 14:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534888003; cv=none; d=google.com; s=arc-20160816; b=BjBlY0r8rxOnwTOmKPTeU5l1MuxBjnoPkUqVB7dgaHZi2LwSZxT/LQ94KhsU6lzuBQ kEZEhXfgCDyw4k5UBryjdqt+YS+WL8Sbcyjex/PDsKCrcZdU4qFhwkIpbxGDRc4XI7aX HZ2sDieA5gXzAEhQXP5dNA4MC/IUhkoq/LG5WfkEB3C8rzRrMy9HPKU1MMqxiF4NmMf2 KfZQuqQuuXz0YyBqeHziTCLUIO5G/VHdBJWCbxJq8HZK5hYoTx1+z39hdtdEKdLkfYGw 9LcvZf/8pt6yGYCLh65wSzzXjyZhi1dN1FCfHKAK6CngLIlbyaVvULe0zXBINR/a2g6H J7TQ== 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=b/v1ib08gpXnKQVOpBS9hExt+6lM9c3yAmrdIjdxow0=; b=sSulC6eVcBGxcoWlnjL3Ljact8d8Iw2hq1YQJ1YQxr9/4erueuF2DKxobRQataMis1 whIf+lVAAJp8iuDuo/pnhducBuM4je/nKAtv4iRF+j4GRLm02iTShbRkLWpz/MSS1xEd tOHbBGmSP1ksv0ovxzkTnTIrIdCoHGwuNjIna+eoDf868So9L4exT+lfcpkGkVXlysHB Z34CikyhwbISIvcCIfT+jRRrKsyUxrY5damZyvvAv7QFmbsmWLfqT251d4eoChI1mU/F ChcSxJFuXqPsTDr0R5LsXbk3vGOs9T7P9hDuxMA3NYOWNhLAHreWw2ewwaAnl+YRaUbX mysQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=fV6+XyUF; 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 i18-v6si13432973pgk.595.2018.08.21.14.46.26; Tue, 21 Aug 2018 14:46:43 -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=fV6+XyUF; 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 S1727051AbeHUXQa (ORCPT + 99 others); Tue, 21 Aug 2018 19:16:30 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34532 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbeHUXQa (ORCPT ); Tue, 21 Aug 2018 19:16:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id l2-v6so10435579wme.1 for ; Tue, 21 Aug 2018 12:54:55 -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=b/v1ib08gpXnKQVOpBS9hExt+6lM9c3yAmrdIjdxow0=; b=fV6+XyUFTFbcxtaLueIyrJ5KuK9m6A8xIcJ+p1wcOYEx0UZIsWwhtj4peEWQAiBbf0 I+NG6lMvxrea6jZXH4T6xoXannNnhLqtfuijRqKH/kjrVofntUr2xcp9YFoo1Kb9u6DW ko/eOk1yH7jBS4q1sBuWqH8L6TpMi4vhPdrq4= 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=b/v1ib08gpXnKQVOpBS9hExt+6lM9c3yAmrdIjdxow0=; b=hjhZQyF7gOhr5EHf4zo9/ZluSyzyueKvanamj9v0LMFRAnd3I1A+9iFGVj7okqzXBn 7sMH+XBD1mktzNigDlNVVkoYrlHCDc3g3rw9LiJtqMpYsNTBEqwzpzS6Hwez4z/D6mA0 nPkxwsuNIAgfvw3nKfDpIAst4nwTesjaxsq8rnN2zvhmiO/367eWMs8HQhJ53mUHK8sV e7MnIJMqkyDVKL4SY/8XEoNHderBAFcrdsHzw9eTmlPm1OuCFduCERLa5npHyzoVzSL5 en45Gr8Fhl5tPsYqskxYfyySdFGiT/XUFiU/CpziloPOse8mZNjQIPFdmzeSvSFN2Ynn wxlQ== X-Gm-Message-State: APzg51CL7Jmoa+Xtd4g74xmkGdHaEkrXPXjkHUc1DXS/8Im3YvRE95k7 SXqJINEpRfxVPudWeYel7EfpDA== X-Received: by 2002:a1c:ae8d:: with SMTP id x135-v6mr539119wme.20.1534881295161; Tue, 21 Aug 2018 12:54:55 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (catv-212-96-48-140.catv.broadband.hu. [212.96.48.140]) by smtp.gmail.com with ESMTPSA id g2-v6sm33523614wrd.71.2018.08.21.12.54.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 12:54:54 -0700 (PDT) Date: Tue, 21 Aug 2018 21:54:46 +0200 From: Miklos Szeredi To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, viro@zeniv.linux.org.uk, hch@infradead.org Subject: [GIT PULL] overlayfs update for 4.19 Message-ID: <20180821195446.GA9512@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 Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git tags/ovl-update-4.19 This contains two new features: 1) Stack file operations: this allows removal of several hacks from the VFS, proper interaction of read-only open files with copy-up, possibility to implement fs modifying ioctls properly, and others. 2) Metadata only copy-up: when file is on lower layer and only metadata is modified (except size) then only copy up the metadata and continue to use the data from the lower file. The vfs bits have been reworked based on Al's open cleanup work. Thanks, Miklos ---------------------------------------------------------------- Al Viro (1): new helper: open_with_fake_path() Amir Goldstein (1): ovl: fix wrong use of impure dir cache in ovl_iterate() Miklos Szeredi (36): vfs: limit size of dedupe vfs: dedupe: return int vfs: dedupe: rationalize args vfs: dedupe: extract helper for a single dedup vfs: make open_with_fake_path() not contribute to nr_files 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 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() ovl: obsolete "check_copy_up" module option ovl: fix documentation of non-standard behavior Vivek Goyal (28): 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: add helper to force data copy-up 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 | 3 +- Documentation/filesystems/overlayfs.txt | 81 +++-- Documentation/filesystems/vfs.txt | 16 +- fs/btrfs/ctree.h | 5 +- fs/btrfs/ioctl.c | 11 +- fs/file_table.c | 69 +++-- fs/inode.c | 46 +-- fs/internal.h | 11 +- fs/ioctl.c | 1 + fs/locks.c | 20 +- fs/namei.c | 2 +- fs/namespace.c | 69 +---- fs/ocfs2/file.c | 17 +- fs/open.c | 44 +-- fs/overlayfs/Kconfig | 19 ++ fs/overlayfs/Makefile | 4 +- fs/overlayfs/copy_up.c | 190 ++++++++---- fs/overlayfs/dir.c | 105 +++++-- fs/overlayfs/export.c | 3 + fs/overlayfs/file.c | 511 ++++++++++++++++++++++++++++++++ fs/overlayfs/inode.c | 175 +++++++---- fs/overlayfs/namei.c | 195 +++++++----- fs/overlayfs/overlayfs.h | 47 ++- fs/overlayfs/ovl_entry.h | 6 +- fs/overlayfs/readdir.c | 19 +- fs/overlayfs/super.c | 103 ++++--- fs/overlayfs/util.c | 252 +++++++++++++++- fs/read_write.c | 94 +++--- fs/xattr.c | 9 +- fs/xfs/xfs_file.c | 29 +- include/linux/dcache.h | 15 +- include/linux/fs.h | 29 +- include/linux/fsnotify.h | 14 +- 33 files changed, 1619 insertions(+), 595 deletions(-) create mode 100644 fs/overlayfs/file.c