<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/bcachefs/two_state_shared_lock.h, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-09-29T20:43:52Z</updated>
<entry>
<title>Remove bcachefs core code</title>
<updated>2025-09-29T20:43:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-09-29T20:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f2c61db29f277b9c80de92102fc532cc247495cd'/>
<id>urn:sha1:f2c61db29f277b9c80de92102fc532cc247495cd</id>
<content type='text'>
bcachefs was marked 'externally maintained' in 6.17 but the code
remained to make the transition smoother.

It's now a DKMS module, making the in-kernel code stale, so remove
it to avoid any version confusion.

Link: https://lore.kernel.org/linux-bcachefs/yokpt2d2g2lluyomtqrdvmkl3amv3kgnipmenobkpgx537kay7@xgcgjviv3n7x/T/
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg()</title>
<updated>2024-07-14T23:00:12Z</updated>
<author>
<name>Uros Bizjak</name>
<email>ubizjak@gmail.com</email>
</author>
<published>2024-05-23T09:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68573b936d3fceda9cd5cce3a577e035d19ad426'/>
<id>urn:sha1:68573b936d3fceda9cd5cce3a577e035d19ad426</id>
<content type='text'>
Use try_cmpxchg() family of functions instead of
cmpxchg (*ptr, old, new) == old. x86 CMPXCHG instruction returns
success in ZF flag, so this change saves a compare after cmpxchg
(and related move instruction in front of cmpxchg).

Also, try_cmpxchg() implicitly assigns old *ptr value to "old" when
cmpxchg fails. There is no need to re-read the value in the loop.

No functional change intended.

Signed-off-by: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Cc: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
Cc: Brian Foster &lt;bfoster@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Inline bch2_two_state_(trylock|unlock)</title>
<updated>2023-10-22T21:09:51Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2022-11-23T17:22:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19fe87e00b6a601b2ec8251d0231f4c9b3bb5002'/>
<id>urn:sha1:19fe87e00b6a601b2ec8251d0231f4c9b3bb5002</id>
<content type='text'>
Standard inlining of fast paths - these locks are now used by our new
nocow mode.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Factor out two_state_shared_lock</title>
<updated>2023-10-22T21:09:45Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2022-11-04T17:25:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7ecd30c8300624448c4e66cd7a7e7209b96ea61'/>
<id>urn:sha1:a7ecd30c8300624448c4e66cd7a7e7209b96ea61</id>
<content type='text'>
We have a unique lock used for controlling adding to the pagecache: the
lock has two states, where both states are shared - the lock may be held
multiple times for either state - but not both states at the same time.

This is exactly what we need for nocow mode locking, so this patch pulls
it out of fs.c into its own file.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
