<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/btree_key_cache.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-05-17T22:46:17Z</updated>
<entry>
<title>bcachefs: Fix bch2_btree_path_traverse_cached() when paths realloced</title>
<updated>2025-05-17T22:46:17Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-05-17T22:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49771a7578cdfb73ca957dc1ca9516872c8b406b'/>
<id>urn:sha1:49771a7578cdfb73ca957dc1ca9516872c8b406b</id>
<content type='text'>
btree_key_cache_fill() will allocate and traverse another path (for the
underlying btree), so we can't hold pointers to paths across a call - we
have to pass indices.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Kill btree_iter.trans</title>
<updated>2025-04-02T14:24:34Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-03-21T19:18:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9180ad2e161b7030e0af78fd2266cbcefe81e652'/>
<id>urn:sha1:9180ad2e161b7030e0af78fd2266cbcefe81e652</id>
<content type='text'>
This was planned to be done ages ago, now finally completed; there are
places where we have quite a few btree_trans objects on the stack, so
this reduces stack usage somewhat.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: do_trace_key_cache_fill()</title>
<updated>2025-04-02T14:24:34Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-03-21T21:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c8f4587d239837b2556a76a11706c987c43909a'/>
<id>urn:sha1:1c8f4587d239837b2556a76a11706c987c43909a</id>
<content type='text'>
Reducing stack frame usage; this moves the printbuf out of the main
stack frame.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix deadlock</title>
<updated>2025-02-27T00:31:05Z</updated>
<author>
<name>Alan Huang</name>
</author>
<published>2025-02-26T09:33:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=677bdb7346b6fd806ea45b11cbfe36de0b0cd644'/>
<id>urn:sha1:677bdb7346b6fd806ea45b11cbfe36de0b0cd644</id>
<content type='text'>
This fixes two deadlocks:

1.pcpu_alloc_mutex involved one as pointed by syzbot[1]
2.recursion deadlock.

The root cause is that we hold the bc lock during alloc_percpu, fix it
by following the pattern used by __btree_node_mem_alloc().

[1] https://lore.kernel.org/all/66f97d9a.050a0220.6bad9.001d.GAE@google.com/T/

Reported-by: syzbot+fe63f377148a6371a9db@syzkaller.appspotmail.com
Tested-by: syzbot+fe63f377148a6371a9db@syzkaller.appspotmail.com
Signed-off-by: Alan Huang &lt;mmpgouride@gmail.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix rcu imbalance in bch2_fs_btree_key_cache_exit()</title>
<updated>2025-02-07T03:35:11Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-02-03T16:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3539880ef1a5f8c970d0f69a6fdcfeffc000e63d'/>
<id>urn:sha1:3539880ef1a5f8c970d0f69a6fdcfeffc000e63d</id>
<content type='text'>
Spotted by sparse.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix btree_trans_peek_key_cache()</title>
<updated>2025-01-21T17:26:25Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-01-21T07:26:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8581752278ef9d6ea73bb10eef2657bfb73e116'/>
<id>urn:sha1:a8581752278ef9d6ea73bb10eef2657bfb73e116</id>
<content type='text'>
BTREE_ITER_cached_nofill has some tricky corner cases; it's used
internally for iterators that aren't walking the key cache, but need to
be coherent with the key cache.

It tells traverse to look up and lock the key cache entry if present,
but don't create one if it doesn't exist.

That means we have to have a BTREE_ITER_UPTODATE path (because after
traverse the path has to be UPTODATE, or we pop assertions) that doesn't
point to anything (which is the less bad option, taken by the previous
fix).

The previous fix for this path missed an issue that can happen in
bch2_trans_peek_key_cache(): we can't set should_be_locked on a path
that doesn't point to anything and doesn't hold locks.

Fixes: bd5b09727f3d ("bcachefs: Don't set btree_path to updtodate if we don't fill")
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Don't set btree_path to updtodate if we don't fill</title>
<updated>2025-01-10T04:38:42Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-12-31T17:58:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd5b09727f3d13bb3c782b5f05041c69784e7fe9'/>
<id>urn:sha1:bd5b09727f3d13bb3c782b5f05041c69784e7fe9</id>
<content type='text'>
This fixes various locking asserts, and a null ptr deref in
bch2_btree_iter_peek_path().

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: fix bch2_btree_key_cache_drop()</title>
<updated>2025-01-10T04:38:41Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-12-21T09:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f908eacc34c7e8092bd47b7fcf5741943d3b734c'/>
<id>urn:sha1:f908eacc34c7e8092bd47b7fcf5741943d3b734c</id>
<content type='text'>
When evicting, we shouldn't leave a pointer to the key cache entry lying
around - that screws up btree path asserts we're adding.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Write lock btree node in key cache fills</title>
<updated>2025-01-10T04:38:41Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-06-08T21:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=861cd0f60624440b51e3ff14b04055b59c13d1e4'/>
<id>urn:sha1:861cd0f60624440b51e3ff14b04055b59c13d1e4</id>
<content type='text'>
this addresses a key cache coherency bug

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: trace_key_cache_fill</title>
<updated>2024-12-29T18:30:39Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-12-13T10:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07c1a6fa901dc478a2685614399dedece910d6f5'/>
<id>urn:sha1:07c1a6fa901dc478a2685614399dedece910d6f5</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
