<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/bcachefs/btree_write_buffer.c, 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-08T04:31:11+00:00</updated>
<entry>
<title>bcachefs: bch2_btree_write_buffer_flush_going_ro()</title>
<updated>2024-11-08T04:31:11+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-11-08T02:48:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ca43f73cd1720e3b0b9c49deec1a13c89c0ca1e8'/>
<id>urn:sha1:ca43f73cd1720e3b0b9c49deec1a13c89c0ca1e8</id>
<content type='text'>
The write buffer needs to be specifically flushed when going RO: keys in
the journal that haven't yet been moved to the write buffer don't have a
journal pin yet.

This fixes numerous syzbot bugs, all with symptoms of still doing writes
after we've got RO.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: silence silly kdoc warning</title>
<updated>2024-07-18T22:33:30+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-07-16T20:43:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f05a0b9c73bc1728b130ac8d1d76b7bbf3f0241d'/>
<id>urn:sha1:f05a0b9c73bc1728b130ac8d1d76b7bbf3f0241d</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Eytzinger accumulation for accounting keys</title>
<updated>2024-07-14T23:00:14+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-27T16:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9efa9673e1d3fee530b582dbde1827d336513a8'/>
<id>urn:sha1:b9efa9673e1d3fee530b582dbde1827d336513a8</id>
<content type='text'>
The btree write buffer takes as input keys from the journal, sorts them,
deduplicates them, and flushes them back to the btree in sorted order.

The disk space accounting rewrite is moving accounting to normal btree
keys, with update (in this case deltas) accumulated in the write buffer
and then flushed to the btree; but this is going to increase the number
of keys handled by the write buffer by perhaps as much as a factor of
3x-5x.

The overhead from copying around and sorting this many keys would cause
a significant performance regression, but: there is huge locality in
updates to accounting keys that we can take advantage of.

Instead of appending accounting keys to the list of keys to be sorted,
this patch adds an eytzinger search tree of recently seen accounting
keys. We look up the accounting key in the eytzinger search tree and
apply the delta directly, adding it if it doesn't exist, and
periodically prune the eytzinger tree of unused entries.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: btree write buffer knows how to accumulate bch_accounting keys</title>
<updated>2024-07-14T23:00:13+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-11-17T05:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d9667d1d6eaca3f6cd3c63cd6a0f309147c7f5c'/>
<id>urn:sha1:5d9667d1d6eaca3f6cd3c63cd6a0f309147c7f5c</id>
<content type='text'>
Teach the btree write buffer how to accumulate accounting keys - instead
of having the newer key overwrite the older key as we do with other
updates, we need to add them together.

Also, add a flag so that write buffer flush knows when journal replay is
finished flushing accounting, and teach it to hold accounting keys until
that flag is set.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch2_btree_write_buffer_maybe_flush()</title>
<updated>2024-06-29T22:34:52+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-29T22:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=92e1c29ae803f85d2f50b4450becb258acae4311'/>
<id>urn:sha1:92e1c29ae803f85d2f50b4450becb258acae4311</id>
<content type='text'>
Add a new helper for checking references to write buffer btrees, where
we need a flush before we definitively know we have an inconsistency.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: iter/update/trigger/str_hash flag cleanup</title>
<updated>2024-05-08T21:29:18+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-04-07T22:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5dd8c60e1e044816d789098ce2454a130e06b03d'/>
<id>urn:sha1:5dd8c60e1e044816d789098ce2454a130e06b03d</id>
<content type='text'>
Combine iter/update/trigger/str_hash flags into a single enum, and
x-macroize them for a to_text() function later.

These flags are all for a specific iter/key/update context, so it makes
sense to group them together - iter/update/trigger flags were already
given distinct bits, this cleans up and unifies that handling.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix btree node merging on write buffer btrees</title>
<updated>2024-04-14T02:49:25+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-27T03:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86dbf8c566417afd62087ecd3bedcf84f91ee4e4'/>
<id>urn:sha1:86dbf8c566417afd62087ecd3bedcf84f91ee4e4</id>
<content type='text'>
The btree write buffer flush fastpath that avoids the main transaction
commit path had the unfortunate side effect of not doing btree node
merging.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix journal pins in btree write buffer</title>
<updated>2024-04-01T00:36:10+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-03-22T08:01:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8aad8e1f659fcea1b24072e816e434e4cd12382d'/>
<id>urn:sha1:8aad8e1f659fcea1b24072e816e434e4cd12382d</id>
<content type='text'>
btree write buffer flush has two phases
 - in natural key order, which is more efficient but may fail
 - then in journal order

The journal order flush was assuming that keys were still correctly
ordered by journal sequence number - but due to coalescing by the
previous phase, we need an additional sort.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Improve bch2_fatal_error()</title>
<updated>2024-03-18T04:24:24+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-03-18T01:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3ed94062e3801e3fd9924ccd54b607abf58cc223'/>
<id>urn:sha1:3ed94062e3801e3fd9924ccd54b607abf58cc223</id>
<content type='text'>
error messages should always include __func__

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: jset_entry for loops declare loop iter</title>
<updated>2024-03-14T01:22:25+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-02-24T03:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b5961b0d8a499100bd90a70075a23f875f1ddf6'/>
<id>urn:sha1:0b5961b0d8a499100bd90a70075a23f875f1ddf6</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
