From: Christian Brauner <brauner@kernel.org>
To: linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <miklos@szeredi.hu>, Karel Zak <kzak@redhat.com>,
Christian Brauner <brauner@kernel.org>
Subject: [PATCH 0/4] fs: allow listmount() with reversed ordering
Date: Fri, 07 Jun 2024 16:55:33 +0200 [thread overview]
Message-ID: <20240607-vfs-listmount-reverse-v1-0-7877a2bfa5e5@kernel.org> (raw)
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
next reply other threads:[~2024-06-07 14:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 14:55 Christian Brauner [this message]
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
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=20240607-vfs-listmount-reverse-v1-0-7877a2bfa5e5@kernel.org \
--to=brauner@kernel.org \
--cc=kzak@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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).