Thread (47 messages) flat view 47 messages, 12 authors, 2024-01-23

Re: [PATCH v4 5/6] add listmount(2) syscall

From: Jonathan Corbet <corbet@lwn.net>
Date: 2023-11-07 21:23:22
Also in: linux-api, linux-fsdevel, linux-man, lkml

Miklos Szeredi [off-list ref] writes:
Add way to query the children of a particular mount.  This is a more
flexible way to iterate the mount tree than having to parse the complete
/proc/self/mountinfo.

Allow listing either

 - immediate child mounts only, or

 - recursively all descendant mounts (depth first).
So I have one probably silly question:
+SYSCALL_DEFINE4(listmount, const struct __mount_arg __user *, req,
+		u64 __user *, buf, size_t, bufsize, unsigned int, flags)
+{
Why use struct __mount_arg (or struct mnt_id_req :) here rather than
just passing in the mount ID directly?  You don't use the request_mask
field anywhere.

Thanks,

jon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help