Thread (26 messages) 26 messages, 6 authors, 2025-10-22

Re: [PATCH] man/man2/move_mount.2: document EINVAL on multiple instances

From: Luca Boccassi <hidden>
Date: 2025-10-06 11:32:54

On Mon, 6 Oct 2025 at 12:19, Alejandro Colomar [off-list ref] wrote:
Hi Luca,

On Mon, Oct 06, 2025 at 11:38:12AM +0100, luca.boccassi@gmail.com wrote:
quoted
From: Luca Boccassi <redacted>

open_tree() with OPEN_TREE_CLONE is needed to apply a mount multiple
times, otherwise EINVAL is returned by move_mount().

Signed-off-by: Luca Boccassi <redacted>
---
As requested by Aleksa on https://github.com/brauner/man-pages-md/pull/19
and based on the 'fs' branch where move_mount(2) was added

 man/man2/move_mount.2 | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/man/man2/move_mount.2 b/man/man2/move_mount.2
index 13063ac1f..e3dfc1ea8 100644
--- a/man/man2/move_mount.2
+++ b/man/man2/move_mount.2
@@ -457,6 +457,13 @@ which would otherwise cause the unbindable mounts to be propagated
 was attempted,
 but one of the listed restrictions was violated.
 .TP
+.B EINVAL
+The source mount is already mounted somewhere else. Clone it via
Please use semantic newlines.  See man-pages(7):

$ MANWIDTH=72 man 7 man-pages | sed -n '/Use semantic newlines/,/^$/p'
   Use semantic newlines
     In the source of a manual page, new sentences should be started on
     new lines, long sentences should be split  into  lines  at  clause
     breaks  (commas,  semicolons, colons, and so on), and long clauses
     should be split at phrase boundaries.  This convention,  sometimes
     known as "semantic newlines", makes it easier to see the effect of
     patches, which often operate at the level of individual sentences,
     clauses, or phrases.

To be precise, that would mean breaking the line after period in this
case.

quoted
+.BR open_tree (2)
+with
+.B \%OPEN_TREE_CLONE
+and use that as the source instead (since Linux 6.15).
The parenthetical in that position makes it unclear if you're saying
that one should use open_tree(2) with OPEN_TREE_CLONE since Linux 6.15,
or if you're saying that this error can happen since that version.
Would you mind clarifying?  I think if you mean that the error can
happen since Linux 6.15, we could make it part of the paragraph tag, as
in unshare(2).
I meant the former, the error is always there, but OPEN_TREE_CLONE can
be used since 6.15 to avoid it. Sent v2 with this and the other fix,
thanks for the prompt review.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help