<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/bcachefs/btree_cache.h, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-11-07T21:48:21+00:00</updated>
<entry>
<title>bcachefs: btree_cache.freeable list fixes</title>
<updated>2024-11-07T21:48:21+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-10-31T05:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=baefd3f849ed956d4c1aee80889093cf0d9c6a94'/>
<id>urn:sha1:baefd3f849ed956d4c1aee80889093cf0d9c6a94</id>
<content type='text'>
When allocating new btree nodes, we were leaving them on the freeable
list - unlocked - allowing them to be reclaimed: ouch.

Additionally, bch2_btree_node_free_never_used() -&gt;
bch2_btree_node_hash_remove was putting it on the freelist, while
bch2_btree_node_free_never_used() was putting it back on the btree
update reserve list - ouch.

Originally, the code was written to always keep btree nodes on a list -
live or freeable - and this worked when new nodes were kept locked.

But now with the cycle detector, we can't keep nodes locked that aren't
tracked by the cycle detector; and this is fine as long as they're not
reachable.

We also have better and more robust leak detection now, with memory
allocation profiling, so the original justification no longer applies.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Rework btree node pinning</title>
<updated>2024-09-21T15:39:48+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-09-05T00:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a51608d0125469664e2daf8e060d6d783924c98'/>
<id>urn:sha1:7a51608d0125469664e2daf8e060d6d783924c98</id>
<content type='text'>
In backpointers fsck, we do a seqential scan of one btree, and check
references to another: extents &lt;-&gt; backpointers

Checking references generates random lookups, so we want to pin that
btree in memory (or only a range, if it doesn't fit in ram).

Previously, this was done with a simple check in the shrinker - "if
btree node is in range being pinned, don't free it" - but this generated
OOMs, as our shrinker wasn't well behaved if there was less memory
available than expected.

Instead, we now have two different shrinkers and lru lists; the second
shrinker being for pinned nodes, with seeks set much higher than normal
- so they can still be freed if necessary, but we'll prefer not to.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: fix failure to relock in bch2_btree_node_mem_alloc()</title>
<updated>2024-08-22T06:07:23+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-08-19T19:22:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c5d0b72a8e8c19c960e8fefb7463067e58b6bc4'/>
<id>urn:sha1:3c5d0b72a8e8c19c960e8fefb7463067e58b6bc4</id>
<content type='text'>
We weren't always so strict about trans-&gt;locked state - but now we are,
and new assertions are shaking some bugs out.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch2_btree_id_to_text()</title>
<updated>2024-07-14T23:00:15+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-07T22:19:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=11169d9983d55f1550ba2d65e074128dd0373937'/>
<id>urn:sha1:11169d9983d55f1550ba2d65e074128dd0373937</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: add counters for failed shrinker reclaim</title>
<updated>2024-05-09T20:24:29+00:00</updated>
<author>
<name>Daniel Hill</name>
<email>daniel@gluo.nz</email>
</author>
<published>2022-09-30T03:37:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bceacfa97ec8b67a76efad2f95899434230b317c'/>
<id>urn:sha1:bceacfa97ec8b67a76efad2f95899434230b317c</id>
<content type='text'>
This adds distinct counters for every reason the btree node shrinker can
fail to free an object - if our shrinker isn't making progress, this
will tell us why.

Signed-off-by: Daniel Hill &lt;daniel@gluo.nz&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Run bch2_check_fix_ptrs() via triggers</title>
<updated>2024-05-08T21:29:20+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-04-07T23:07:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f40d13f94df744185f99732e89bc8d085729ecc9'/>
<id>urn:sha1:f40d13f94df744185f99732e89bc8d085729ecc9</id>
<content type='text'>
Currently, the reflink_p gc trigger does repair as well - turning a
reflink_p key into an error key if the reflink_v it points to doesn't
exist.

This won't work with online check/repair, because the repair path once
online will be subject to transaction restarts, but BTREE_TRIGGER_gc is
not idempotant - we can't run it multiple times if we get a transaction
restart.

So we need to split these paths; to do so this patch calls
check_fix_ptrs() by a new general path - a new trigger type,
BTREE_TRIGGER_check_repair.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Prep work for variable size btree node buffers</title>
<updated>2024-01-21T18:27:10+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-01-16T18:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec4edd7b9d2038a97e0ba3fad8fc8492b0d12d35'/>
<id>urn:sha1:ec4edd7b9d2038a97e0ba3fad8fc8492b0d12d35</id>
<content type='text'>
bcachefs btree nodes are big - typically 256k - and btree roots are
pinned in memory. As we're now up to 18 btrees, we now have significant
memory overhead in mostly empty btree roots.

And in the future we're going to start enforcing that certain btree node
boundaries exist, to solve lock contention issues - analagous to XFS's
AGIs.

Thus, we need to start allocating smaller btree node buffers when we
can. This patch changes code that refers to the filesystem constant
c-&gt;opts.btree_node_size to refer to the btree node buffer size -
btree_buf_bytes() - where appropriate.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Include btree_trans in more tracepoints</title>
<updated>2024-01-01T16:47:40+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-02T08:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a564c9fad581972a4bf02d598ec3ad3f53dcbae2'/>
<id>urn:sha1:a564c9fad581972a4bf02d598ec3ad3f53dcbae2</id>
<content type='text'>
This gives us more context information - e.g. which codepath is invoking
btree node reads.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch2_btree_id_str()</title>
<updated>2023-10-31T16:18:37+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-10-20T02:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=88dfe193bd2abd08926c1a0d48b770bb68ac8ccb'/>
<id>urn:sha1:88dfe193bd2abd08926c1a0d48b770bb68ac8ccb</id>
<content type='text'>
Since we can run with unknown btree IDs, we can't directly index btree
IDs into fixed size arrays.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Assorted sparse fixes</title>
<updated>2023-10-22T21:10:06+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-07-07T02:47:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73bd774d28d2b2e6a05c31bf7afb9247e02a8e49'/>
<id>urn:sha1:73bd774d28d2b2e6a05c31bf7afb9247e02a8e49</id>
<content type='text'>
 - endianness fixes
 - mark some things static
 - fix a few __percpu annotations
 - fix silent enum conversions

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