<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/bkey_methods.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-04-20T23:41:38Z</updated>
<entry>
<title>bcachefs: Stricter checks on "key allowed in this btree"</title>
<updated>2025-04-20T23:41:38Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-04-18T16:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71f8e806a5e4edada72456ee3b2e2d7eab6fadee'/>
<id>urn:sha1:71f8e806a5e4edada72456ee3b2e2d7eab6fadee</id>
<content type='text'>
Syzbot managed to come up with a filesystem where check/repair got
rather confused at finding a reflink pointer in the inodes btree.

Currently, the "key allowed in this btree" checks only apply at commit
time, not read time - for forwards compatibility. It seems this is too
loose.

Now, strict key type allowed checks apply:
 - at commit time (no forward compatibility issues)
 - for btree node pointers
 - if it's a known btree, known key type, and the key type has the
   "BKEY_TYPE_strict_btree_checks" flag.

This means we still have the option of using generic key types - e.g.
KEY_TYPE_error, KEY_TYPE_set - on more existing btrees in the future,
while most key types that are intended for only a specific btree get
stricter checks.

Reported-by: syzbot+baee8591f336cab0958b@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: struct bkey_validate_context</title>
<updated>2024-12-21T06:36:20Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-11-27T05:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6f4794fcd8627638153614193b3b81f37a28175'/>
<id>urn:sha1:a6f4794fcd8627638153614193b3b81f37a28175</id>
<content type='text'>
Add a new parameter to bkey validate functions, and use it to improve
invalid bkey error messages: we can now print the btree and depth it
came from, or if it came from the journal, or is a btree root.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: rename version -&gt; bversion</title>
<updated>2024-09-28T01:46:35Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-09-26T19:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf49f8a8c277f9f2b78e2a56189a741a508a9820'/>
<id>urn:sha1:cf49f8a8c277f9f2b78e2a56189a741a508a9820</id>
<content type='text'>
give bversions a more distinct name, to aid in grepping

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Make bkey_fsck_err() a wrapper around fsck_err()</title>
<updated>2024-08-14T03:00:50Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-08-13T01:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d97de0d017cde0d442c3d144b4f969f43064cc0f'/>
<id>urn:sha1:d97de0d017cde0d442c3d144b4f969f43064cc0f</id>
<content type='text'>
bkey_fsck_err() was added as an interface that looks like fsck_err(),
but previously all it did was ensure that the appropriate error counter
was incremented in the superblock.

This is a cleanup and bugfix patch that converts it to a wrapper around
fsck_err(). This is needed to fix an issue with the upgrade path to
disk_accounting_v3, where the "silent fix" error list now includes
bkey_fsck errors; fsck_err() handles this in a unified way, and since we
need to change printing of bkey fsck errors from the caller to the inner
bkey_fsck_err() calls, this ends up being a pretty big change.

Als,, rename .invalid() methods to .validate(), for clarity, while we're
changing the function signature anyways (to drop the printbuf argument).

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: KEY_TYPE_accounting</title>
<updated>2024-07-14T23:00:13Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-12-27T23:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2744e5c9eb1a1090b5f61c955e934c70bfe6b04c'/>
<id>urn:sha1:2744e5c9eb1a1090b5f61c955e934c70bfe6b04c</id>
<content type='text'>
New key type for the disk space accounting rewrite.

 - Holds a variable sized array of u64s (may be more than one for
   accounting e.g. compressed and uncompressed size, or buckets and
   sectors for a given data type)

 - Updates are deltas, not new versions of the key: this means updates
   to accounting can happen via the btree write buffer, which we'll be
   teaching to accumulate deltas.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix array-index-out-of-bounds</title>
<updated>2024-06-19T22:27:23Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-06-12T23:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d47df4f616d523b4ef832d03ec28b2e6d838067b'/>
<id>urn:sha1:d47df4f616d523b4ef832d03ec28b2e6d838067b</id>
<content type='text'>
We use 0 size arrays as markers, but ubsan doesn't know that - cast them
to a pointer to fix the splat.

Also, make sure this code gets tested a bit more.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: add no_invalid_checks flag</title>
<updated>2024-05-09T20:24:30Z</updated>
<author>
<name>Thomas Bertschinger</name>
</author>
<published>2024-05-09T18:37:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07f9a27f1969764d11374942961d51fee0ab628f'/>
<id>urn:sha1:07f9a27f1969764d11374942961d51fee0ab628f</id>
<content type='text'>
Setting this flag on a filesystem results in validity checks being
skipped when writing bkeys. This flag will be used by tooling that
deliberately injects corruption into a filesystem in order to exercise
fsck. It shouldn't be set outside of testing/debugging code.

Signed-off-by: Thomas Bertschinger &lt;tahbertschinger@gmail.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: s/bkey_invalid_flags/bch_validate_flags</title>
<updated>2024-05-09T20:23:36Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-05-08T22:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65eaf4e24ab6b4809491248e1fed36b8d49c1ea9'/>
<id>urn:sha1:65eaf4e24ab6b4809491248e1fed36b8d49c1ea9</id>
<content type='text'>
We're about to start using bch_validate_flags for superblock section
validation - it's no longer bkey specific.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Guard against unknown k.k-&gt;type in __bkey_invalid()</title>
<updated>2024-05-06T14:58:17Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-05-06T02:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bb9600d5d4735953c47dd1ee99382c68dd04caa'/>
<id>urn:sha1:2bb9600d5d4735953c47dd1ee99382c68dd04caa</id>
<content type='text'>
For forwards compatibility we have to allow unknown key types, and only
run the checks that make sense against them.

Fix a missing guard on k.k-&gt;type being known.

Reported-by: syzbot+ae4dc916da3ce51f284f@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Interior known are required to have known key types</title>
<updated>2024-04-14T22:01:12Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2024-04-14T03:59:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d789e9a7d5e2799f4d5425b0b620210d2fcad529'/>
<id>urn:sha1:d789e9a7d5e2799f4d5425b0b620210d2fcad529</id>
<content type='text'>
For forwards compatibilyt, we allow bkeys of unknown type in leaf nodes;
we can simply ignore metadata we don't understand. Pointers to btree
nodes must always be of known types, howwever.

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