linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] fs: allow listmount() with reversed ordering
@ 2024-06-07 14:55 Christian Brauner
  2024-06-07 14:55 ` [PATCH 1/4] fs: use semaphore gard in listmount() Christian Brauner
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Christian Brauner @ 2024-06-07 14:55 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Miklos Szeredi, Karel Zak, Christian Brauner

util-linux is about to implement listmount() and statmount() support.
Karel requested the ability to scan the mount table in backwards order
because that's what libmount currently does in order to get the latest
mount first. We currently don't support this in listmount(). Add a new
LISTMOUNT_RESERVE flag to allow listing mounts in reverse order. For
example, listing all child mounts of /sys without LISTMOUNT_REVERSE
gives:

    /sys/kernel/security @ mnt_id: 4294968369
    /sys/fs/cgroup @ mnt_id: 4294968370
    /sys/firmware/efi/efivars @ mnt_id: 4294968371
    /sys/fs/bpf @ mnt_id: 4294968372
    /sys/kernel/tracing @ mnt_id: 4294968373
    /sys/kernel/debug @ mnt_id: 4294968374
    /sys/fs/fuse/connections @ mnt_id: 4294968375
    /sys/kernel/config @ mnt_id: 4294968376

whereas with LISTMOUNT_RESERVE it gives:

    /sys/kernel/config @ mnt_id: 4294968376
    /sys/fs/fuse/connections @ mnt_id: 4294968375
    /sys/kernel/debug @ mnt_id: 4294968374
    /sys/kernel/tracing @ mnt_id: 4294968373
    /sys/fs/bpf @ mnt_id: 4294968372
    /sys/firmware/efi/efivars @ mnt_id: 4294968371
    /sys/fs/cgroup @ mnt_id: 4294968370
    /sys/kernel/security @ mnt_id: 4294968369

A few smaller cleanups included in this series.

---
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240607-vfs-listmount-reverse-0f5d4d8248ee


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-13 11:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-07 14:55 [PATCH 0/4] fs: allow listmount() with reversed ordering Christian Brauner
2024-06-07 14:55 ` [PATCH 1/4] fs: use semaphore gard in listmount() Christian Brauner
2024-06-07 14:55 ` [PATCH 2/4] path: add cleanup helper Christian Brauner
2024-06-07 14:55 ` [PATCH 3/4] fs: simplify error handling Christian Brauner
2024-06-07 14:55 ` [PATCH 4/4] listmount: allow listing in reverse order Christian Brauner
2024-06-12 13:54   ` Matthew Wilcox
2024-06-13 11:41     ` Christian Brauner
2024-06-07 16:08 ` [PATCH 0/4] fs: allow listmount() with reversed ordering Mateusz Guzik
2024-06-10 13:16   ` Christian Brauner
2024-06-07 19:03 ` Josef Bacik

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).