<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/bcachefs/io_write.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>2024-01-01T16:46:52Z</updated>
<entry>
<title>bcachefs: fix buffer overflow in nocow write path</title>
<updated>2024-01-01T16:46:52Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-12-30T20:32:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9534cc9fc455214e857bc1d32f44d5a229dc602'/>
<id>urn:sha1:d9534cc9fc455214e857bc1d32f44d5a229dc602</id>
<content type='text'>
BCH_REPLICAS_MAX isn't the actual maximum number of pointers in an
extent, it's the maximum number of dirty pointers.

We don't have a real restriction on the number of cached pointers, and
we don't want a fixed size array here anyways - so switch to
DARRAY_PREALLOCATED().

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
Reported-and-tested-by: Daniel J Blueman &lt;daniel@quora.org&gt;
</content>
</entry>
<entry>
<title>closures: CLOSURE_CALLBACK() to fix type punning</title>
<updated>2023-11-24T05:29:58Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-18T00:13:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d4e3b928ab487a8aecd1f6a140b40ac365116cfb'/>
<id>urn:sha1:d4e3b928ab487a8aecd1f6a140b40ac365116cfb</id>
<content type='text'>
Control flow integrity is now checking that type signatures match on
indirect function calls. That breaks closures, which embed a work_struct
in a closure in such a way that a closure_fn may also be used as a
workqueue fn by the underlying closure code.

So we have to change closure fns to take a work_struct as their
argument - but that results in a loss of clarity, as closure fns have
different semantics from normal workqueue functions (they run owning a
ref on the closure, which must be released with continue_at() or
closure_return()).

Thus, this patc introduces CLOSURE_CALLBACK() and closure_type() macros
as suggested by Kees, to smooth things over a bit.

Suggested-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Coly Li &lt;colyli@suse.de&gt;
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix no_data_io mode checksum check</title>
<updated>2023-11-15T04:44:44Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-13T02:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62d73dfc44d54c97e0df6b947f0bccf6c4b8030e'/>
<id>urn:sha1:62d73dfc44d54c97e0df6b947f0bccf6c4b8030e</id>
<content type='text'>
In no_data_io mode, we expect data checksums to be wrong - don't want to
spew the log with them.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: x-macro-ify inode flags enum</title>
<updated>2023-11-05T18:12:18Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-02T15:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=103ffe9aaf85660f40c8b68797a374b80b29b91d'/>
<id>urn:sha1:103ffe9aaf85660f40c8b68797a374b80b29b91d</id>
<content type='text'>
This lets us use bch2_prt_bitflags to print them out.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Add a comment for BTREE_INSERT_NOJOURNAL usage</title>
<updated>2023-11-05T02:19:13Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-11-04T17:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9fcdd23b6eea3f04475cd9cfb4497f6e26906061'/>
<id>urn:sha1:9fcdd23b6eea3f04475cd9cfb4497f6e26906061</id>
<content type='text'>
BTREE_INSERT_NOJOURNAL is primarily used for a performance optimization
related to inode updates and fsync - document it.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Add IO error counts to bch_member</title>
<updated>2023-11-02T01:11:08Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-25T20:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94119eeb02d114aa1f78dcfaabdca50b9b626790'/>
<id>urn:sha1:94119eeb02d114aa1f78dcfaabdca50b9b626790</id>
<content type='text'>
We now track IO errors per device since filesystem creation.

IO error counts can be viewed in sysfs, or with the 'bcachefs
show-super' command.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: rebalance_work</title>
<updated>2023-11-02T01:11:05Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-20T17:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb3f57bb1177ae4d5550bbb431f90ebf277329e8'/>
<id>urn:sha1:fb3f57bb1177ae4d5550bbb431f90ebf277329e8</id>
<content type='text'>
This adds a new btree, rebalance_work, to eliminate scanning required
for finding extents that need work done on them in the background - i.e.
for the background_target and background_compression options.

rebalance_work is a bitset btree, where a KEY_TYPE_set corresponds to an
extent in the extents or reflink btree at the same pos.

A new extent field is added, bch_extent_rebalance, which indicates that
this extent has work that needs to be done in the background - and which
options to use. This allows per-inode options to be propagated to
indirect extents - at least in some circumstances. In this patch,
changing IO options on a file will not propagate the new options to
indirect extents pointed to by that file.

Updating (setting/clearing) the rebalance_work btree is done by the
extent trigger, which looks at the bch_extent_rebalance field.

Scanning is still requrired after changing IO path options - either just
for a given inode, or for the whole filesystem. We indicate that
scanning is required by adding a KEY_TYPE_cookie key to the
rebalance_work btree: the cookie counter is so that we can detect that
scanning is still required when an option has been flipped mid-way
through an existing scan.

Future possible work:
 - Propagate options to indirect extents when being changed
 - Add other IO path options - nr_replicas, ec, to rebalance_work so
   they can be applied in the background when they change
 - Add a counter, for bcachefs fs usage output, showing the pending
   amount of rebalance work: we'll probably want to do this after the
   disk space accounting rewrite (moving it to a new btree)

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Check for too-large encoded extents</title>
<updated>2023-10-31T16:18:37Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-22T15:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9db2f86060a8e54e80f99e3c3366832ce6a67d76'/>
<id>urn:sha1:9db2f86060a8e54e80f99e3c3366832ce6a67d76</id>
<content type='text'>
We don't yet repair (split) them, just check.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Ensure we don't exceed encoded_extent_max</title>
<updated>2023-10-31T16:18:37Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-10-22T15:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d39081291470750cc605c917531d7cd85aebf94'/>
<id>urn:sha1:2d39081291470750cc605c917531d7cd85aebf94</id>
<content type='text'>
The write path may (rarely) see an encoded (checksummed) extent that
exceeds encoded_extent_max - this can happen when we're moving an
existing extent that was not checksummed, but was given a checksum by
bch2_write_rechecksum().

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: nocow locking: Fix lock leak</title>
<updated>2023-10-22T21:10:15Z</updated>
<author>
<name>Kent Overstreet</name>
</author>
<published>2023-09-25T01:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=efedfc2ece141389a9f522a298781cc929262701'/>
<id>urn:sha1:efedfc2ece141389a9f522a298781cc929262701</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
