<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/util.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-03-28T16:36:32Z</updated>
<entry>
<title>bcachefs: print_string_as_lines: fix extra newline</title>
<updated>2025-03-28T16:36:32Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-03-26T15:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35a11506a341cca48900570f68abdaefc9b84646'/>
<id>urn:sha1:35a11506a341cca48900570f68abdaefc9b84646</id>
<content type='text'>
Don't print a newline on empty string; this was causing us to also print
an extra newline when we got to the end of th string.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Debug params for data corruption injection</title>
<updated>2025-03-16T17:47:55Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2025-03-08T23:42:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a06cb8000addbbfd1f9ce6891098da5b48d3d1e'/>
<id>urn:sha1:5a06cb8000addbbfd1f9ce6891098da5b48d3d1e</id>
<content type='text'>
dm-flakey is busted, and this is simpler anyways - this lets us test the
checksum error retry ptahs

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: eytzinger1_{next,prev} cleanup</title>
<updated>2025-03-15T01:02:14Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-28T17:24:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f27614652cd33184fb8a8464c1b0b893d350b33d'/>
<id>urn:sha1:f27614652cd33184fb8a8464c1b0b893d350b33d</id>
<content type='text'>
The eytzinger code was previously relying on the following wrap-around
properties and their "eytzinger0" equivalents:

  eytzinger1_prev(0, size) == eytzinger1_last(size)
  eytzinger1_next(0, size) == eytzinger1_first(size)

However, these properties are no longer relied upon and no longer
necessary, so remove the corresponding asserts and forbid the use of
eytzinger1_prev(0, size) and eytzinger1_next(0, size).

This allows to further simplify the code in eytzinger1_next() and
eytzinger1_prev(): where the left shifting happens, eytzinger1_next() is
trying to move i to the lowest child on the left, which is equivalent to
doubling i until the next doubling would cause it to be greater than
size.  This is implemented by shifting i to the left so that the most
significant bits align and then shifting i to the right by one if the
result is greater than size.

Likewise, eytzinger1_prev() is trying to move to the lowest child on the
right; the same applies here.

The 1-offset in (size - 1) in eytzinger1_next() isn't needed at all, but
the equivalent offset in eytzinger1_prev() is surprisingly needed to
preserve the 'eytzinger1_prev(0, size) == eytzinger1_last(size)'
property.  However, since we no longer support that property, we can get
rid of these offsets as well.  This saves one addition in each function
and makes the code less confusing.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Add eytzinger0_find self test</title>
<updated>2025-03-15T01:02:14Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-02-01T12:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=956032edd25d971da2820754242eaa7a925a8215'/>
<id>urn:sha1:956032edd25d971da2820754242eaa7a925a8215</id>
<content type='text'>
Function eytzinger0_find() isn't currently covered, so add a self test.

We can rely on eytzinger0_find_le() here because it is being
tested independently.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: add eytzinger0_find_ge self test</title>
<updated>2025-03-15T01:02:14Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-27T16:15:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=63ce189b00c37a6fd0297d45ddede5442adb0a28'/>
<id>urn:sha1:63ce189b00c37a6fd0297d45ddede5442adb0a28</id>
<content type='text'>
Add an eytzinger0_find_ge() self test similar to eytzinger0_find_gt().

Note that this test requires eytzinger0_find_ge() to return the first
matching element in the array in case of duplicates.  To prevent
bisection errors, we only add this test after strenghening the original
implementation (see the previous commit).

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: add eytzinger0_find_gt self test</title>
<updated>2025-03-15T01:02:13Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-27T16:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7cd33f7efbb91893bb20aa2baae4f8c37dd035a'/>
<id>urn:sha1:d7cd33f7efbb91893bb20aa2baae4f8c37dd035a</id>
<content type='text'>
Add an eytzinger0_find_gt() self test similar to eytzinger0_find_le().

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: improve eytzinger0_find_le self test</title>
<updated>2025-03-15T01:02:13Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-26T16:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c722b818a2f8c43d75efeba8005af5f17dc535f0'/>
<id>urn:sha1:c722b818a2f8c43d75efeba8005af5f17dc535f0</id>
<content type='text'>
Rename eytzinger0_find_test_val() to eytzinger0_find_test_le() and add a
new eytzinger0_find_test_val() wrapper that calls it.

We have already established that the array is sorted in eytzinger order,
so we can use the eytzinger iterator functions and check the boundary
conditions to verify the result of eytzinger0_find_le().

Only scan the entire array if we get an incorrect result.  When we need
to scan, use eytzinger0_for_each_prev() so that we'll stop at the
highest matching element in the array in case there are duplicates;
going through the array linearly wouldn't give us that.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: add eytzinger0_for_each_prev</title>
<updated>2025-03-15T01:02:13Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-27T16:26:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc5ceaaad81a724e7090d8709290fae36e3f2a5d'/>
<id>urn:sha1:dc5ceaaad81a724e7090d8709290fae36e3f2a5d</id>
<content type='text'>
Add an eytzinger0_for_each_prev() macro for iterating through an
eytzinger array in reverse.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: eytzinger0_find_test improvement</title>
<updated>2025-03-15T01:02:13Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-26T10:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8a0966ffaa6aae8d64a0159a47541e32f2f587a'/>
<id>urn:sha1:e8a0966ffaa6aae8d64a0159a47541e32f2f587a</id>
<content type='text'>
In eytzinger0_find_test(), remember the smallest element seen so far
instead of comparing adjacent array elements.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: eytzinger[01]_test improvement</title>
<updated>2025-03-15T01:02:13Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2025-01-26T10:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec70103f9b8a2d28644fcf0c027421cfa15553b1'/>
<id>urn:sha1:ec70103f9b8a2d28644fcf0c027421cfa15553b1</id>
<content type='text'>
In eytzinger[01]_test(), make sure that eytzinger[01]_for_each()
iterates over all array elements.

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