<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/bkey_methods.c, branch linux-6.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-11-05T02:19:13Z</updated>
<entry>
<title>bcachefs: rebalance_work btree is not a snapshots btree</title>
<updated>2023-11-05T02:19:13Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-03T22:30:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3c7727bb9269c7f7a2f17ef76b9e5c9b8cc8863'/>
<id>urn:sha1:d3c7727bb9269c7f7a2f17ef76b9e5c9b8cc8863</id>
<content type='text'>
rebalance_work entries may refer to entries in the extents btree, which
is a snapshots btree, or they may also refer to entries in the reflink
btree, which is not.

Hence rebalance_work keys may use the snapshot field but it's not
required to be nonzero - add a new btree flag to reflect this.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Enumerate fsck errors</title>
<updated>2023-11-02T01:11:08Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-25T00:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b65db750e2bb9252321fd54c284edd73c1595a09'/>
<id>urn:sha1:b65db750e2bb9252321fd54c284edd73c1595a09</id>
<content type='text'>
This patch adds a superblock error counter for every distinct fsck
error; this means that when analyzing filesystems out in the wild we'll
be able to see what sorts of inconsistencies are being found and repair,
and hence what bugs to look for.

Errors validating bkeys are not yet considered distinct fsck errors, but
this patch adds a new helper, bkey_fsck_err(), in order to add distinct
error types for them as well.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix btree_node_type enum</title>
<updated>2023-10-31T16:18:37Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-20T04:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50a38ca1baace3dc66027ad41393917b05318b14'/>
<id>urn:sha1:50a38ca1baace3dc66027ad41393917b05318b14</id>
<content type='text'>
More forwards compatibility fixups: having BKEY_TYPE_btree at the end of
the enum conflicts with unnkown btree IDs, this shifts BKEY_TYPE_btree
to slot 0 and fixes things up accordingly.

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:37Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-20T02:49:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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: Fix handling of unknown bkey types</title>
<updated>2023-10-22T21:10:16Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-29T00:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6929d5e74e473fb8b15875c627f7c5ad963c1889'/>
<id>urn:sha1:6929d5e74e473fb8b15875c627f7c5ad963c1889</id>
<content type='text'>
min_val_size was U8_MAX for unknown key types, causing us to flag any
known key as invalid - it should have been 0.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix W=12 build errors</title>
<updated>2023-10-22T21:10:13Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-12T22:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96dea3d599dbc31f59eb786af2ac5079122beb88'/>
<id>urn:sha1:96dea3d599dbc31f59eb786af2ac5079122beb88</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix -Wincompatible-function-pointer-types-strict from key_invalid callbacks</title>
<updated>2023-10-22T21:10:13Z</updated>
<author>
<name>Nathan Chancellor</name>
</author>
<published>2023-09-12T19:15:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f70225d7791e67084073e54489440d7cf8017e0'/>
<id>urn:sha1:1f70225d7791e67084073e54489440d7cf8017e0</id>
<content type='text'>
When building bcachefs with -Wincompatible-function-pointer-types-strict,
a clang warning designed to catch issues with mismatched function
pointer types, which will be fatal at runtime due to kernel Control Flow
Integrity (kCFI), there are several instances along the lines of:

  fs/bcachefs/bkey_methods.c:118:2: error: incompatible function pointer types initializing 'int (*)(const struct bch_fs *, struct bkey_s_c, enum bkey_invalid_flags, struct printbuf *)' with an expression of type 'int (const struct bch_fs *, struct bkey_s_c, unsigned int, struct printbuf *)' [-Werror,-Wincompatible-function-pointer-types-strict]
    118 |         BCH_BKEY_TYPES()
        |         ^~~~~~~~~~~~~~~~
  fs/bcachefs/bcachefs_format.h:342:2: note: expanded from macro 'BCH_BKEY_TYPES'
    342 |         x(deleted,              0)                      \
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
  fs/bcachefs/bkey_methods.c:117:41: note: expanded from macro 'x'
    117 | #define x(name, nr) [KEY_TYPE_##name]   = bch2_bkey_ops_##name,
        |                                           ^~~~~~~~~~~~~~~~~~~~
  &lt;scratch space&gt;:206:1: note: expanded from here
    206 | bch2_bkey_ops_deleted
        | ^~~~~~~~~~~~~~~~~~~~~
  fs/bcachefs/bkey_methods.c:34:17: note: expanded from macro 'bch2_bkey_ops_deleted'
     34 |         .key_invalid = deleted_key_invalid,             \
        |                        ^~~~~~~~~~~~~~~~~~~

The flags parameter should be of type 'enum bkey_invalid_flags', not
'unsigned int'. Adjust the type everywhere so that there is no more
warning.

Signed-off-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Log truncate operations</title>
<updated>2023-10-22T21:10:12Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-10T20:42:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b030e262b517b6bddc4bfa88ed8d335ef9de7671'/>
<id>urn:sha1:b030e262b517b6bddc4bfa88ed8d335ef9de7671</id>
<content type='text'>
Previously, we guaranteed atomicity of truncate after unclean shutdown
with the BCH_INODE_I_SIZE_DIRTY flag - which required a full scan of the
inodes btree.

Recently the deleted inodes btree was added so that we no longer have to
scan for deleted inodes, but truncate was unfinished and that change
left it broken.

This patch uses the new logged operations btree to fix truncate
atomicity; we now log an operation that can be replayed at the start of
a truncate.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Split out snapshot.c</title>
<updated>2023-10-22T21:10:11Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-16T20:54:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e877caaad818595ecb6754355cea2058fd9848e'/>
<id>urn:sha1:8e877caaad818595ecb6754355cea2058fd9848e</id>
<content type='text'>
subvolume.c has gotten a bit large, this splits out a separate file just
for managing snapshot trees - BTREE_ID_snapshots.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Consolidate btree id properties</title>
<updated>2023-10-22T21:10:09Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-07-21T09:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8d2fe3b4bfad1c902f9b0acea1edc8d5291deb9'/>
<id>urn:sha1:e8d2fe3b4bfad1c902f9b0acea1edc8d5291deb9</id>
<content type='text'>
This refactoring centralizes defining per-btree properties.

bch2_key_types_allowed was also about to overflow a u32, so expand that
to a u64.

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