<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/fs/pnode.c, branch v6.17.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.17.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v6.17.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2025-08-19T16:05:59Z</updated>
<entry>
<title>change_mnt_propagation(): calculate propagation source only if we'll need it</title>
<updated>2025-08-19T16:05:59Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-08-15T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fb924b7b8669503582e003dd7b7340ee49029801'/>
<id>urn:sha1:fb924b7b8669503582e003dd7b7340ee49029801</id>
<content type='text'>
We only need it when mount in question was sending events downstream (then
recepients need to switch to new master) or the mount is being turned into
slave (then we need a new master for it).

That wouldn't be a big deal, except that it causes quite a bit of work
when umount_tree() is taking a large peer group out.  Adding a trivial
"don't bother calling propagation_source() unless we are going to use
its results" logics improves the things quite a bit.

We are still doing unnecessary work on bulk removals from propagation graph,
but the full solution for that will have to wait for the next merge window.

Fixes: 955336e204ab "do_make_slave(): choose new master sanely"
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>propagate_umount(): only surviving overmounts should be reparented</title>
<updated>2025-08-19T16:00:07Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-08-15T03:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da025cdb97a23c1916d8491925b878f3e1de0bca'/>
<id>urn:sha1:da025cdb97a23c1916d8491925b878f3e1de0bca</id>
<content type='text'>
... as the comments in reparent() clearly say.  As it is, we reparent
*all* overmounts of the mounts being taken out, including those that
are taken out themselves.  It's not only a potentially massive slowdown
(on a pathological setup we might end up with O(N^2) time for N mounts
being kicked out), it can end up with incorrect -&gt;overmount in the
surviving mounts.

Fixes: f0d0ba19985d "Rewrite of propagate_umount()"
Reviewed-by: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>copy_tree(): don't link the mounts via mnt_list</title>
<updated>2025-06-29T23:03:37Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-18T01:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=663206854f020ec6fc6bfd3d52f501a28ede1403'/>
<id>urn:sha1:663206854f020ec6fc6bfd3d52f501a28ede1403</id>
<content type='text'>
The only place that really needs to be adjusted is commit_tree() -
there we need to iterate through the copy and we might as well
use next_mnt() for that.  However, in case when our tree has been
slid under something already mounted (propagation to a mountpoint
that already has something mounted on it or a 'beneath' move_mount)
we need to take care not to walk into the overmounting tree.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>change_mnt_propagation(): move -&gt;mnt_master assignment into MS_SLAVE case</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-25T03:54:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd5a4e1d640bf3542c4583491e6b91d25de3b760'/>
<id>urn:sha1:dd5a4e1d640bf3542c4583491e6b91d25de3b760</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>mnt_slave_list/mnt_slave: turn into hlist_head/hlist_node</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-25T03:51:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8c5a853f58c5b86b033842b78a0ad3d1208672fa'/>
<id>urn:sha1:8c5a853f58c5b86b033842b78a0ad3d1208672fa</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>turn do_make_slave() into transfer_propagation()</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-25T03:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=94a8d0027606397ce58b00077bf6146f25923965'/>
<id>urn:sha1:94a8d0027606397ce58b00077bf6146f25923965</id>
<content type='text'>
Lift calculation of replacement propagation source, removal from
peer group and assignment of -&gt;mnt_master from do_make_slave() into
change_mnt_propagation() itself.  What remains is switching of
what used to get propagation *through* mnt to alternative source.
Rename to transfer_propagation(), passing it the replacement source
as the second argument.  Have it return void, while we are at it.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>do_make_slave(): choose new master sanely</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-24T22:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=955336e204ab59301ff8b1f75a98a226f5a98782'/>
<id>urn:sha1:955336e204ab59301ff8b1f75a98a226f5a98782</id>
<content type='text'>
When mount changes propagation type so that it doesn't propagate
events any more (MS_PRIVATE, MS_SLAVE, MS_UNBINDABLE), we need
to make sure that event propagation between other mounts is
unaffected.

We need to make sure that events from peers and master of that mount
(if any) still reach everything that used to be on its -&gt;mnt_slave_list.

If mount has neither peers nor master, we simply need to dissolve
its -&gt;mnt_slave_list and clear -&gt;mnt_master of everything in there.

If mount has peers, we transfer everything in -&gt;mnt_slave_list of
this mount into that of some of those peers (and adjust -&gt;mnt_master
accordingly).

If mount has a master but no peers, we transfer everything in
-&gt;mnt_slave_list of this mount into that of its master (adjusting
-&gt;mnt_master, etc.).

There are two problems with the current implementation:
	* there's a long-obsolete logics in choosing the peer -
once upon a time it made sense to prefer the peer that had the
same -&gt;mnt_root as our mount, but that had been pointless since
2014 ("smarter propagate_mnt()")
	* the most common caller of that thing is umount_tree()
taking the mounts out of propagation graph.  In that case it's
possible to have -&gt;mnt_slave_list contents moved many times,
since the replacement master is likely to be taken out by the
same umount_tree(), etc.

Take the choice of replacement master into a separate function
(propagation_source()) and teach it to skip the candidates that
are going to be taken out.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>change_mnt_propagation(): do_make_slave() is a no-op unless IS_MNT_SHARED()</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-25T03:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ef86251194de9b31f7efcf70ea480ebe736e9e60'/>
<id>urn:sha1:ef86251194de9b31f7efcf70ea480ebe736e9e60</id>
<content type='text'>
... since mnt-&gt;mnt_share and mnt-&gt;mnt_slave_list are guaranteed to be empty unless
IS_MNT_SHARED(mnt).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>change_mnt_propagation() cleanups, step 1</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-25T03:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d5f15047f13b86b74d1ac4f39036ccae2078c492'/>
<id>urn:sha1:d5f15047f13b86b74d1ac4f39036ccae2078c492</id>
<content type='text'>
Lift changing -&gt;mnt_slave from do_make_slave() into the caller.
Simplifies the next steps...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>propagate_mnt(): fix comment and convert to kernel-doc, while we are at it</title>
<updated>2025-06-29T23:03:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2025-06-28T03:39:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0313356520b15deab893cd62da3e2ba9a6e61a1f'/>
<id>urn:sha1:0313356520b15deab893cd62da3e2ba9a6e61a1f</id>
<content type='text'>
Mountpoint is passed as struct mountpoint *, not struct dentry *
(and called dest_mp, not dest_dentry) since 2013.

Roots of created copies are linked via mnt_hash, not mnt_list since
a bit before the merge into mainline back in 2005.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
