From patchwork Mon Mar 11 01:07:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 10846535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A50014DE for ; Mon, 11 Mar 2019 01:07:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C96A28E54 for ; Mon, 11 Mar 2019 01:07:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EAB928E56; Mon, 11 Mar 2019 01:07:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4542528E54 for ; Mon, 11 Mar 2019 01:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbfCKBHI (ORCPT ); Sun, 10 Mar 2019 21:07:08 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:46382 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbfCKBHI (ORCPT ); Sun, 10 Mar 2019 21:07:08 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1h39PF-0006nk-4X; Mon, 11 Mar 2019 01:07:05 +0000 Date: Mon, 11 Mar 2019 01:07:05 +0000 From: Al Viro To: Linus Torvalds Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org Subject: [git pull] vfs.git next portion of mount stuff Message-ID: <20190311010704.GJ2217@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Description: dhowells@redhat.com, fsdevel Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The rest of core infrastructure; no new syscalls in that pile, but the old parts are switched to new infrastructure. At that point conversions of individual filesystems can happen independently; some are done here (afs, cgroup, procfs, etc.), there's also a large series outside of that pile dealing with NFS (quite a bit of option-parsing stuff is getting used there - it's one of the most convoluted filesystems in terms of mount-related logics), but NFS bits are the next cycle fodder. It got seriously simplified since the last cycle; documentation is probably the weakest bit at the moment - I considered dropping the commit introducing Documentation/filesystems/mount_api.txt (cutting the size increase by quarter ;-), but decided that it would be better to fix it up after -rc1 instead. That pile allows to do followup work in independent branches, which should make life much easier for the next cycle. fs/super.c size increase is unpleasant; there's a followup series that allows to shrink it considerably, but I decided to leave that until the next cycle. Two trivial conflicts (fs/Makefile and include/linux/kernfs.h), both as straighforward as it gets. Sat in -next for weeks; the only change after it went there had been the removal of rather obnoxious forest of macros in fs_parser.h - with unchanged cpp output. The following changes since commit 35ac1184244f1329783e1d897f74926d8bb1103a: cgroup: saner refcounting for cgroup_root (2019-01-17 11:53:02 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.mount for you to fetch changes up to c99c2171fc61476afac0dfb59fb2c447a01fb1e0: afs: Use fs_context to pass parameters over automount (2019-02-28 03:29:39 -0500) ---------------------------------------------------------------- Al Viro (19): kill kernfs_pin_sb() separate copying and locking mount tree on cross-userns copies saner handling of temporary namespaces new helpers: vfs_create_mount(), fc_mount() teach vfs_get_tree() to handle subtype, switch do_new_mount() to it vfs_get_tree(): evict the call of security_sb_kern_mount() fs_context flavour for submounts introduce fs_context methods convenience helpers: vfs_get_super() and sget_fc() introduce cloning of fs_context cgroup: start switching to fs_context cgroup: fold cgroup1_mount() into cgroup1_get_tree() cgroup: take options parsing into ->parse_monolithic() cgroup1: switch to option-by-option parsing cgroup2: switch to option-by-option parsing cgroup: stash cgroup_root reference into cgroup_fs_context cgroup_do_mount(): massage calling conventions cgroup1_get_tree(): separate "get cgroup_root to use" into a separate helper cgroup: store a reference to cgroup_ns into cgroup_fs_context David Howells (22): vfs: Introduce fs_context, switch vfs_kern_mount() to it. new helper: do_new_mount_fc() convert do_remount_sb() to fs_context vfs: Introduce logging functions vfs: Add configuration parser helpers vfs: Add LSM hooks for the new mount API selinux: Implement the new mount API LSM hooks smack: Implement filesystem context security hooks vfs: Put security flags into the fs_context struct vfs: Implement a filesystem superblock creation/configuration context procfs: Move proc_fill_super() to fs/proc/root.c proc: Add fs_context support to procfs ipc: Convert mqueue fs to fs_context kernfs, sysfs, cgroup, intel_rdt: Support fs_context cpuset: Use fs_context hugetlbfs: Convert to fs_context vfs: Remove kern_mount_data() vfs: Provide documentation for new mount API vfs: Implement logging through fs_context vfs: Add some logging to the core users of the fs_context log afs: Add fs_context support afs: Use fs_context to pass parameters over automount Documentation/filesystems/mount_api.txt | 709 ++++++++++++++++++++++++++++++++ arch/x86/kernel/cpu/resctrl/internal.h | 16 + arch/x86/kernel/cpu/resctrl/rdtgroup.c | 185 +++++---- fs/Kconfig | 7 + fs/Makefile | 3 +- fs/afs/internal.h | 9 +- fs/afs/mntpt.c | 149 +++---- fs/afs/super.c | 430 +++++++++---------- fs/afs/volume.c | 4 +- fs/filesystems.c | 4 + fs/fs_context.c | 642 +++++++++++++++++++++++++++++ fs/fs_parser.c | 447 ++++++++++++++++++++ fs/hugetlbfs/inode.c | 358 +++++++++------- fs/internal.h | 13 +- fs/kernfs/kernfs-internal.h | 1 + fs/kernfs/mount.c | 119 ++---- fs/mount.h | 5 + fs/namei.c | 4 +- fs/namespace.c | 395 +++++++++++------- fs/pnode.c | 5 - fs/pnode.h | 3 +- fs/proc/inode.c | 52 +-- fs/proc/internal.h | 5 +- fs/proc/root.c | 236 ++++++++--- fs/super.c | 344 +++++++++++++--- fs/sysfs/mount.c | 73 +++- include/linux/errno.h | 1 + include/linux/fs.h | 14 +- include/linux/fs_context.h | 188 +++++++++ include/linux/fs_parser.h | 151 +++++++ include/linux/kernfs.h | 39 +- include/linux/lsm_hooks.h | 21 + include/linux/mount.h | 3 + include/linux/security.h | 18 +- ipc/mqueue.c | 94 ++++- ipc/namespace.c | 2 +- kernel/cgroup/cgroup-internal.h | 49 ++- kernel/cgroup/cgroup-v1.c | 394 +++++++++--------- kernel/cgroup/cgroup.c | 223 ++++++---- kernel/cgroup/cpuset.c | 56 ++- security/security.c | 10 + security/selinux/hooks.c | 88 +++- security/selinux/include/security.h | 10 +- security/smack/smack.h | 19 +- security/smack/smack_lsm.c | 92 ++++- 45 files changed, 4358 insertions(+), 1332 deletions(-) create mode 100644 Documentation/filesystems/mount_api.txt create mode 100644 fs/fs_context.c create mode 100644 fs/fs_parser.c create mode 100644 include/linux/fs_context.h create mode 100644 include/linux/fs_parser.h