linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Christian Brauner <brauner@kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Cc: Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Reinette Chatre <reinette.chatre@intel.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	Tejun Heo <tj@kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Naohiro Aota <naohiro.aota@wdc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-nfs@vger.kernel.org, linux-hardening@vger.kernel.org,
	cgroups@vger.kernel.org
Subject: split up ->kill_sb
Date: Wed, 13 Sep 2023 08:09:54 -0300	[thread overview]
Message-ID: <20230913111013.77623-1-hch@lst.de> (raw)

Hi Al and Christian,

this series splits ->kill_sb into separate ->shutdown_sb and ->free_sb
methods and then calls generic_shutdown_super from common code to clean
up the file system shutdown interface.

As a first step towards that it moves allocating and freeing the
anonymous block device dev_t into common code. As every super_block must
have a valid s_dev it makes sense to just do that if the file system
didn't set one by itself, and we can also detect if one was assigned
easily when shutting down.

A git tree is available here:

    git://git.infradead.org/users/hch/misc.git fs-kill_sb

Gitweb:

    http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/fs-kill_sb

Diffstat:
 Documentation/filesystems/locking.rst     |    9 -
 Documentation/filesystems/vfs.rst         |   15 ++
 arch/powerpc/platforms/cell/spufs/inode.c |   10 -
 arch/s390/hypfs/inode.c                   |   43 --------
 arch/x86/kernel/cpu/resctrl/rdtgroup.c    |    7 -
 block/bdev.c                              |    1 
 drivers/android/binderfs.c                |   12 --
 drivers/base/devtmpfs.c                   |    8 -
 drivers/dax/super.c                       |    1 
 drivers/dma-buf/dma-buf.c                 |    1 
 drivers/gpu/drm/drm_drv.c                 |    1 
 drivers/infiniband/hw/qib/qib.h           |    4 
 drivers/infiniband/hw/qib/qib_fs.c        |  105 ++++---------------
 drivers/infiniband/hw/qib/qib_init.c      |   32 ++----
 drivers/misc/cxl/api.c                    |    1 
 drivers/misc/ibmasm/ibmasmfs.c            |    8 -
 drivers/mtd/mtdsuper.c                    |   12 --
 drivers/scsi/cxlflash/ocxl_hw.c           |    1 
 drivers/usb/gadget/function/f_fs.c        |    6 -
 drivers/usb/gadget/legacy/inode.c         |   18 +--
 drivers/xen/xenfs/super.c                 |    8 -
 fs/9p/vfs_super.c                         |   16 ---
 fs/adfs/super.c                           |    2 
 fs/affs/super.c                           |    7 -
 fs/afs/super.c                            |   27 ++---
 fs/aio.c                                  |    1 
 fs/anon_inodes.c                          |    1 
 fs/autofs/autofs_i.h                      |    3 
 fs/autofs/init.c                          |    3 
 fs/autofs/inode.c                         |   24 ++--
 fs/befs/linuxvfs.c                        |    2 
 fs/bfs/inode.c                            |    2 
 fs/binfmt_misc.c                          |    8 -
 fs/btrfs/super.c                          |   16 +--
 fs/btrfs/tests/btrfs-tests.c              |    1 
 fs/ceph/super.c                           |   20 +--
 fs/coda/inode.c                           |    1 
 fs/configfs/mount.c                       |    8 -
 fs/cramfs/inode.c                         |    6 -
 fs/debugfs/inode.c                        |    8 -
 fs/devpts/inode.c                         |    6 -
 fs/ecryptfs/main.c                        |   14 --
 fs/efivarfs/super.c                       |   13 +-
 fs/efs/super.c                            |    7 -
 fs/erofs/super.c                          |   25 +---
 fs/exfat/super.c                          |    6 -
 fs/ext2/super.c                           |    2 
 fs/ext4/super.c                           |   12 +-
 fs/f2fs/super.c                           |    6 -
 fs/fat/namei_msdos.c                      |    2 
 fs/fat/namei_vfat.c                       |    2 
 fs/freevxfs/vxfs_super.c                  |    2 
 fs/fuse/control.c                         |   12 +-
 fs/fuse/inode.c                           |   19 +--
 fs/fuse/virtio_fs.c                       |   21 ++-
 fs/gfs2/ops_fstype.c                      |   11 --
 fs/hfs/super.c                            |    2 
 fs/hfsplus/super.c                        |    2 
 fs/hostfs/hostfs_kern.c                   |    5 
 fs/hpfs/super.c                           |    2 
 fs/hugetlbfs/inode.c                      |    2 
 fs/isofs/inode.c                          |    2 
 fs/jffs2/super.c                          |   22 ++--
 fs/jfs/super.c                            |    2 
 fs/kernfs/mount.c                         |   20 +--
 fs/minix/inode.c                          |    2 
 fs/nfs/client.c                           |    2 
 fs/nfs/fs_context.c                       |   19 +++
 fs/nfs/internal.h                         |    1 
 fs/nfs/nfs4proc.c                         |    8 -
 fs/nfs/nfs4trace.h                        |    6 -
 fs/nfs/nfs4xdr.c                          |    2 
 fs/nfs/super.c                            |   26 ----
 fs/nfs/sysfs.h                            |    2 
 fs/nfsd/nfsctl.c                          |   22 ++--
 fs/nilfs2/super.c                         |    2 
 fs/nsfs.c                                 |    1 
 fs/ntfs/super.c                           |    2 
 fs/ntfs3/super.c                          |    6 -
 fs/ocfs2/dlmfs/dlmfs.c                    |    2 
 fs/ocfs2/super.c                          |    2 
 fs/omfs/inode.c                           |    2 
 fs/openpromfs/inode.c                     |    1 
 fs/orangefs/orangefs-kernel.h             |    2 
 fs/orangefs/orangefs-mod.c                |    2 
 fs/orangefs/super.c                       |   13 --
 fs/overlayfs/super.c                      |    1 
 fs/pipe.c                                 |    1 
 fs/proc/root.c                            |   16 +--
 fs/pstore/inode.c                         |    8 -
 fs/qnx4/inode.c                           |    7 -
 fs/qnx6/inode.c                           |    2 
 fs/ramfs/inode.c                          |    6 -
 fs/reiserfs/super.c                       |    7 -
 fs/romfs/super.c                          |    6 -
 fs/smb/client/cifsfs.c                    |   17 ++-
 fs/squashfs/super.c                       |    2 
 fs/super.c                                |  159 ++++++++++++++++--------------
 fs/sysfs/mount.c                          |    7 -
 fs/sysv/super.c                           |    4 
 fs/tracefs/inode.c                        |    2 
 fs/ubifs/super.c                          |   10 -
 fs/udf/super.c                            |    2 
 fs/ufs/super.c                            |    2 
 fs/vboxsf/super.c                         |    1 
 fs/xfs/xfs_buf.c                          |    2 
 fs/xfs/xfs_super.c                        |    6 -
 fs/zonefs/super.c                         |   34 ++----
 include/linux/fs.h                        |   11 --
 include/linux/kernfs.h                    |    5 
 include/linux/mtd/super.h                 |    2 
 include/linux/nfs_fs_sb.h                 |    1 
 include/linux/ramfs.h                     |    2 
 init/do_mounts.c                          |    6 -
 ipc/mqueue.c                              |    2 
 kernel/bpf/inode.c                        |    2 
 kernel/cgroup/cgroup.c                    |   10 +
 kernel/resource.c                         |    1 
 mm/secretmem.c                            |    1 
 mm/shmem.c                                |    5 
 net/socket.c                              |    1 
 net/sunrpc/rpc_pipe.c                     |   19 ++-
 security/apparmor/apparmorfs.c            |    1 
 security/inode.c                          |    8 -
 security/selinux/selinuxfs.c              |   15 --
 security/smack/smackfs.c                  |    6 -
 126 files changed, 524 insertions(+), 679 deletions(-)

             reply	other threads:[~2023-09-13 11:10 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13 11:09 Christoph Hellwig [this message]
2023-09-13 11:09 ` [PATCH 01/19] fs: reflow deactivate_locked_super Christoph Hellwig
2023-09-13 16:35   ` Christian Brauner
2023-09-26  9:24     ` Christoph Hellwig
2023-09-13 11:09 ` [PATCH 02/19] fs: make ->kill_sb optional Christoph Hellwig
2023-09-13 11:09 ` [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super Christoph Hellwig
2023-09-13 23:27   ` Al Viro
2023-09-14  2:37     ` Al Viro
2023-09-14  5:38       ` Al Viro
2023-09-14  7:56         ` Christian Brauner
2023-09-26  9:31           ` Christoph Hellwig
2023-09-14 14:02         ` Christian Brauner
2023-09-14 16:58           ` Al Viro
2023-09-14 19:23             ` Al Viro
2023-09-15  7:40               ` Christian Brauner
2023-09-15  9:44             ` Christian Brauner
2023-09-15 14:12               ` Christian Brauner
2023-09-15 14:28                 ` Al Viro
2023-09-15 14:33                   ` Al Viro
2023-09-15 14:40                   ` Christian Brauner
2023-09-26  9:41         ` Christoph Hellwig
2023-09-26  9:38     ` Christoph Hellwig
2023-09-26 21:25       ` Al Viro
2023-09-27 22:29         ` Al Viro
2023-10-02  6:46         ` Christoph Hellwig
2023-10-09 21:57           ` Al Viro
2023-10-10  8:44             ` Christian Brauner
2023-10-17 19:50               ` Al Viro
2023-09-13 11:09 ` [PATCH 04/19] NFS: remove the s_dev field from struct nfs_server Christoph Hellwig
2023-09-13 11:09 ` [PATCH 05/19] fs: assign an anon dev_t in common code Christoph Hellwig
2023-09-14  0:34   ` Al Viro
2023-09-13 11:10 ` [PATCH 06/19] qibfs: use simple_release_fs Christoph Hellwig
2023-09-18 11:41   ` Leon Romanovsky
2023-09-13 11:10 ` [PATCH 07/19] hypfs: use d_genocide to kill fs entries Christoph Hellwig
2023-09-13 11:10 ` [PATCH 08/19] pstore: shrink the pstore_sb_lock critical section in pstore_kill_sb Christoph Hellwig
2023-09-13 22:07   ` Kees Cook
2023-09-13 11:10 ` [PATCH 09/19] zonefs: remove duplicate cleanup in zonefs_fill_super Christoph Hellwig
2023-09-14  0:33   ` Damien Le Moal
2023-09-14  0:49   ` Al Viro
2023-09-13 11:10 ` [PATCH 10/19] USB: gadget/legacy: remove sb_mutex Christoph Hellwig
2023-09-13 16:10   ` Alan Stern
2023-09-26  9:24     ` Christoph Hellwig
2023-09-14 10:22   ` Sergey Shtylyov
2023-09-13 11:10 ` [PATCH 11/19] fs: add new shutdown_sb and free_sb methods Christoph Hellwig
2023-09-14  2:07   ` Al Viro
2023-09-13 11:10 ` [PATCH 12/19] fs: convert kill_litter_super to litter_shutdown_sb Christoph Hellwig
2023-09-13 22:07   ` Kees Cook
2023-09-13 11:10 ` [PATCH 13/19] fs: convert kill_block_super to block_free_sb Christoph Hellwig
2023-09-14  2:29   ` Al Viro
2023-09-13 11:10 ` [PATCH 14/19] jffs2: convert to ->shutdown_sb and ->free_sb Christoph Hellwig
2023-09-13 11:10 ` [PATCH 15/19] kernfs: split ->kill_sb Christoph Hellwig
2023-09-18 15:24   ` Michal Koutný
2023-09-13 11:10 ` [PATCH 16/19] x86/resctrl: release rdtgroup_mutex and the CPU hotplug lock in rdt_shutdown_sb Christoph Hellwig
2023-09-13 11:10 ` [PATCH 17/19] NFS: move nfs_kill_super to fs_context.c Christoph Hellwig
2023-09-13 11:10 ` [PATCH 18/19] fs: simple ->shutdown_sb and ->free_sb conversions Christoph Hellwig
2023-09-13 11:10 ` [PATCH 19/19] fs: remove ->kill_sb Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230913111013.77623-1-hch@lst.de \
    --to=hch@lst.de \
    --cc=agordeev@linux.ibm.com \
    --cc=anna@kernel.org \
    --cc=brauner@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dlemoal@kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=gor@linux.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hca@linux.ibm.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=naohiro.aota@wdc.com \
    --cc=reinette.chatre@intel.com \
    --cc=richard@nod.at \
    --cc=tj@kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=vigneshr@ti.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).