linux/arch/m68k
Linus Torvalds 8c9440fea7 vfs-6.8.mount
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZZU0CgAKCRCRxhvAZXjc
 osncAQDSJK0frJL+72NqXxa4YNzivrnuw6fhp5iaDAEqxdm8ygEAoJWyh7Rmkt8G
 drAXWGyGnCYqv7UgC6axLyciid7TxQg=
 =vJuv
 -----END PGP SIGNATURE-----

Merge tag 'vfs-6.8.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs mount updates from Christian Brauner:
 "This contains the work to retrieve detailed information about mounts
  via two new system calls. This is hopefully the beginning of the end
  of the saga that started with fsinfo() years ago.

  The LWN articles in [1] and [2] can serve as a summary so we can avoid
  rehashing everything here.

  At LSFMM in May 2022 we got into a room and agreed on what we want to
  do about fsinfo(). Basically, split it into pieces. This is the first
  part of that agreement. Specifically, it is concerned with retrieving
  information about mounts. So this only concerns the mount information
  retrieval, not the mount table change notification, or the extended
  filesystem specific mount option work. That is separate work.

  Currently mounts have a 32bit id. Mount ids are already in heavy use
  by libmount and other low-level userspace but they can't be relied
  upon because they're recycled very quickly. We agreed that mounts
  should carry a unique 64bit id by which they can be referenced
  directly. This is now implemented as part of this work.

  The new 64bit mount id is exposed in statx() through the new
  STATX_MNT_ID_UNIQUE flag. If the flag isn't raised the old mount id is
  returned. If it is raised and the kernel supports the new 64bit mount
  id the flag is raised in the result mask and the new 64bit mount id is
  returned. New and old mount ids do not overlap so they cannot be
  conflated.

  Two new system calls are introduced that operate on the 64bit mount
  id: statmount() and listmount(). A summary of the api and usage can be
  found on LWN as well (cf. [3]) but of course, I'll provide a summary
  here as well.

  Both system calls rely on struct mnt_id_req. Which is the request
  struct used to pass the 64bit mount id identifying the mount to
  operate on. It is extensible to allow for the addition of new
  parameters and for future use in other apis that make use of mount
  ids.

  statmount() mimicks the semantics of statx() and exposes a set flags
  that userspace may raise in mnt_id_req to request specific information
  to be retrieved. A statmount() call returns a struct statmount filled
  in with information about the requested mount. Supported requests are
  indicated by raising the request flag passed in struct mnt_id_req in
  the @mask argument in struct statmount.

  Currently we do support:

   - STATMOUNT_SB_BASIC:
     Basic filesystem info

   - STATMOUNT_MNT_BASIC
     Mount information (mount id, parent mount id, mount attributes etc)

   - STATMOUNT_PROPAGATE_FROM
     Propagation from what mount in current namespace

   - STATMOUNT_MNT_ROOT
     Path of the root of the mount (e.g., mount --bind /bla /mnt returns /bla)

   - STATMOUNT_MNT_POINT
     Path of the mount point (e.g., mount --bind /bla /mnt returns /mnt)

   - STATMOUNT_FS_TYPE
     Name of the filesystem type as the magic number isn't enough due to submounts

  The string options STATMOUNT_MNT_{ROOT,POINT} and STATMOUNT_FS_TYPE
  are appended to the end of the struct. Userspace can use the offsets
  in @fs_type, @mnt_root, and @mnt_point to reference those strings
  easily.

  The struct statmount reserves quite a bit of space currently for
  future extensibility. This isn't really a problem and if this bothers
  us we can just send a follow-up pull request during this cycle.

  listmount() is given a 64bit mount id via mnt_id_req just as
  statmount(). It takes a buffer and a size to return an array of the
  64bit ids of the child mounts of the requested mount. Userspace can
  thus choose to either retrieve child mounts for a mount in batches or
  iterate through the child mounts. For most use-cases it will be
  sufficient to just leave space for a few child mounts. But for big
  mount tables having an iterator is really helpful. Iterating through a
  mount table works by setting @param in mnt_id_req to the mount id of
  the last child mount retrieved in the previous listmount() call"

Link: https://lwn.net/Articles/934469 [1]
Link: https://lwn.net/Articles/829212 [2]
Link: https://lwn.net/Articles/950569 [3]

* tag 'vfs-6.8.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  add selftest for statmount/listmount
  fs: keep struct mnt_id_req extensible
  wire up syscalls for statmount/listmount
  add listmount(2) syscall
  statmount: simplify string option retrieval
  statmount: simplify numeric option retrieval
  add statmount(2) syscall
  namespace: extract show_path() helper
  mounts: keep list of mounts in an rbtree
  add unique mount ID
2024-01-08 10:57:34 -08:00
..
68000 m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
amiga m68k: amiga: Add and use "amiga.h" 2023-10-06 10:03:02 +02:00
apollo m68k: apollo: Add and use "apollo.h" 2023-10-06 10:03:02 +02:00
atari m68k: atari: Add and use "atari.h" 2023-10-06 10:03:02 +02:00
bvme6000 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
coldfire m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
configs m68k: defconfig: Update virt_defconfig for v6.6-rc3 2023-10-06 10:03:04 +02:00
emu m68k: emu: Mark version[] __maybe_unused 2023-10-06 10:03:02 +02:00
fpsp040 m68k: fpsp040: Fix indentation by 5 spaces 2023-10-16 14:30:40 +02:00
hp300 m68k: hp300: Include "time.h" for hp300_sched_init() 2023-10-06 10:03:03 +02:00
ifpsp060 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
include m68k, kexec: fix the incorrect ifdeffery and build dependency of CONFIG_KEXEC 2023-12-12 17:20:17 -08:00
kernel vfs-6.8.mount 2024-01-08 10:57:34 -08:00
lib m68k: lib: Include <linux/libgcc.h> for __muldi3() 2023-10-16 14:30:40 +02:00
mac m68k: mac: Add and use "mac.h" 2023-10-06 10:03:03 +02:00
math-emu m68k: math-emu: Add missing prototypes 2023-10-06 10:03:01 +02:00
mm m68knommu: updates and fixes for v6.7 2023-11-02 15:31:01 -10:00
mvme16x m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
mvme147 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
q40 m68k: Replace GPL 2.0+ README.legal boilerplate with SPDX 2023-10-06 10:03:04 +02:00
sun3 m68k: sun3: Fix indentation by 5 or 7 spaces 2023-10-16 14:30:39 +02:00
sun3x m68k: sun3/3x: Add and use "sun3.h" 2023-10-06 10:03:04 +02:00
tools/amiga m68k: tools: Replace zero-length array with flexible-array member 2020-05-25 10:55:56 +02:00
virt m68k: Rework BI_VIRT_RNG_SEED as BI_RNG_SEED 2022-09-28 22:16:44 +02:00
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
Kbuild m68k: Introduce a virtual m68k machine 2022-04-11 11:48:01 +02:00
Kconfig dma-mapping updates for Linux 6.7 2023-11-01 13:15:54 -10:00
Kconfig.bus m68k: coldfire: drop ISA_DMA_API support 2022-05-16 13:18:30 +10:00
Kconfig.cpu m68k: use the coherent DMA code for coldfire without data cache 2023-10-22 16:38:54 +02:00
Kconfig.debug m68k: Remove obsolete config NO_KERNEL_MSG 2023-03-20 15:39:14 +01:00
Kconfig.devices m68k: /proc/hardware should depend on PROC_FS 2023-02-13 11:34:49 +01:00
Kconfig.machine m68knommu: improve config ROM setting defaults 2023-10-23 08:22:22 +10:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00