<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/bkey.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-10-22T21:10:13Z</updated>
<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: Array bounds fixes</title>
<updated>2023-10-22T21:10:12Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-10T00:10:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5cfd69775eb5460ef78bb5034a37eb0dc52ab65d'/>
<id>urn:sha1:5cfd69775eb5460ef78bb5034a37eb0dc52ab65d</id>
<content type='text'>
It's no longer legal to use a zero size array as a flexible array
member - this causes UBSAN to complain.

This patch switches our zero size arrays to normal flexible array
members when possible, and inserts casts in other places (e.g. where we
use the zero size array as a marker partway through an array).

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix bkey format calculation</title>
<updated>2023-10-22T21:10:11Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-13T23:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=029b85fe417c36b5689093dd4861c7980299a50f'/>
<id>urn:sha1:029b85fe417c36b5689093dd4861c7980299a50f</id>
<content type='text'>
For extents, we increase the number of bits of the size field to allow
extents to get bigger due to merging - but this code didn't check for
overflow.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: BCH_COMPAT_bformat_overflow_done no longer required</title>
<updated>2023-10-22T21:10:09Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-06T14:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e08e63e44e65761e6eb53fcd568d194f607daa61'/>
<id>urn:sha1:e08e63e44e65761e6eb53fcd568d194f607daa61</id>
<content type='text'>
Awhile back, we changed bkey_format generation to ensure that the packed
representation could never represent fields larger than the unpacked
representation.

This was to ensure that bkey_packed_successor() always gave a sensible
result, but in the current code bkey_packed_successor() is only used in
a debug assertion - not for anything important.

This kills the requirement that we've gotten rid of those weird bkey
formats, and instead changes the assertion to check if we're dealing
with an old weird bkey format.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: kill EBUG_ON() redefinition in bkey.c</title>
<updated>2023-10-22T21:10:09Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-06T14:02:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58705da67aedc3f68db322d2529ff52a5cdec0fa'/>
<id>urn:sha1:58705da67aedc3f68db322d2529ff52a5cdec0fa</id>
<content type='text'>
our debug mode assertions in bkey.c haven't been getting run, whoops

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix shift by 64 in set_inc_field()</title>
<updated>2023-10-22T21:10:09Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-03T20:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77212d3a76a4becabeac8736b686a533dd75913b'/>
<id>urn:sha1:77212d3a76a4becabeac8736b686a533dd75913b</id>
<content type='text'>
UBSAN was complaining about a shift by 64 in set_inc_field().

This only happened when the value being shifted was 0, so in theory
should be harmless - a shift by 64 (or register width) should logically
give a result of 0, but CPUs will in practice leave the input unchanged
when the number of bits to shift by wraps - and since our input here is
0, the output is still what we want.

But, it's still undefined behaviour and we need our UBSAN output to be
clean, so it needs to be fixed.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bkey_format helper improvements</title>
<updated>2023-10-22T21:10:09Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-08-03T18:42:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c6439650ec913c83d48055da63b8f204075afb7'/>
<id>urn:sha1:6c6439650ec913c83d48055da63b8f204075afb7</id>
<content type='text'>
 - add a to_text() method for bkey_format

 - convert bch2_bkey_format_validate() to modern error message style,
   where we pass a printbuf for the error string instead of returning a
   static string

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Use memcpy_u64s_small() for copying keys</title>
<updated>2023-10-22T21:10:01Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-05-13T21:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d598a9b7e27158d3b6972077e2f7296f279c2e8b'/>
<id>urn:sha1:d598a9b7e27158d3b6972077e2f7296f279c2e8b</id>
<content type='text'>
Small performance optimization; an open coded loop is better than rep ;
movsq for small copies.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Add some unlikely() annotations</title>
<updated>2023-10-22T21:09:48Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2022-11-24T01:11:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47a0ea6abeef60115e3ca60ed0a640bba376a7d0'/>
<id>urn:sha1:47a0ea6abeef60115e3ca60ed0a640bba376a7d0</id>
<content type='text'>
Add a few easy unlikely() optimizations. These are mainly worthwhile
because the compiler will (usually) put the branch-not-taken path at the
end of the function, meaning better icache utilization.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: extents no longer require special handling for packing</title>
<updated>2023-10-22T21:09:47Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2022-11-26T09:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6530d89e0a598592badde77930269740b44ea2ee'/>
<id>urn:sha1:6530d89e0a598592badde77930269740b44ea2ee</id>
<content type='text'>
Extent overwrite used to  be handled differently, underneath the
journaling layer and within the core btree code. This imposed
restrictions on bkey packing/packed formats, which no longer apply.

This patch deletes those restrictions.

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