<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/bcachefs/debug.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-14T02:56:50+00:00</updated>
<entry>
<title>bcachefs: Convert for_each_btree_node() to lockrestart_do()</title>
<updated>2024-08-14T02:56:50+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-08-07T20:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=968feb854a86b59cc4bc72af3105989706ca2c7d'/>
<id>urn:sha1:968feb854a86b59cc4bc72af3105989706ca2c7d</id>
<content type='text'>
for_each_btree_node() now works similarly to for_each_btree_key(), where
the loop body is passed as an argument to be passed to lockrestart_do().

This now calls trans_begin() on every loop iteration - which fixes an
SRCU warning in backpointers fsck.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix loop restart in bch2_btree_transactions_read()</title>
<updated>2024-06-29T01:08:48+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-29T01:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=67c564111f0e705dc272035197606c37bae94610'/>
<id>urn:sha1:67c564111f0e705dc272035197606c37bae94610</id>
<content type='text'>
Accidental infinite loop; also fix btree_deadlock_to_text()

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix btree_trans list ordering</title>
<updated>2024-06-23T04:57:21+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-23T02:11:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1aaf5cb41b8e92dcd3ac7e047124cb0e3e27f1c1'/>
<id>urn:sha1:1aaf5cb41b8e92dcd3ac7e047124cb0e3e27f1c1</id>
<content type='text'>
The debug code relies on btree_trans_list being ordered so that it can
resume on subsequent calls or lock restarts.

However, it was using trans-&gt;locknig_wait.task.pid, which is incorrect
since btree_trans objects are cached and reused - typically by different
tasks.

Fix this by switching to pointer order, and also sort them lazily when
required - speeding up the btree_trans_get() fastpath.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Fix race between trans_put() and btree_transactions_read()</title>
<updated>2024-06-23T04:57:21+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-23T02:02:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de611ab6fc5ed0d68dd46319b9913353e3b459e9'/>
<id>urn:sha1:de611ab6fc5ed0d68dd46319b9913353e3b459e9</id>
<content type='text'>
debug.c was using closure_get() on a different thread's closure where
the we don't know if the object being refcounted is alive.

We keep btree_trans objects on a list so they can be printed by debug
code, and because it is cost prohibitive to touch the btree_trans list
every time we allocate and free btree_trans objects, cached objects are
also on this list.

However, we do not want the debug code to see cached but not in use
btree_trans objects - critically because the btree_paths array will have
been freed (if it was reallocated).

closure_get() is also incorrect to use when that get may race with it
hitting zero, i.e. we must already have a ref on the object or know the
ref can't currently hit 0 for other reasons (as used in the cycle
detector).

to fix this, use the previously introduced closure_get_not_zero(),
closure_return_sync(), and closure_init_stack_release(); the debug code
now can only take a ref on a trans object if it's alive and in use.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Make btree_deadlock_to_text() clearer</title>
<updated>2024-06-23T04:57:21+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-23T00:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18e92841e87bc548fcb91530115a66e72eecb10c'/>
<id>urn:sha1:18e92841e87bc548fcb91530115a66e72eecb10c</id>
<content type='text'>
btree_deadlock_to_text() searches the list of btree transactions to find
a deadlock - when it finds one it's done; it's not like other *_read()
functions that's printing each object.

Factor out btree_deadlock_to_text() to make this clearer.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: fix seqmutex_relock()</title>
<updated>2024-06-23T04:57:21+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-06-23T00:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f44cc269a1c148ad83332d85fe54607e8874ca79'/>
<id>urn:sha1:f44cc269a1c148ad83332d85fe54607e8874ca79</id>
<content type='text'>
We were grabbing the sequence number before unlock incremented it - fix
this by moving the increment to seqmutex_lock() (so the seqmutex_relock()
failure path skips the mutex_trylock()), and returning the sequence
number from unlock(), to make the API simpler and safer.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch2_dev_get_ioref() checks for device not present</title>
<updated>2024-05-09T20:23:36+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-04-30T19:37:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c91ab7262e6b08bbc76b83ed1981602fa6ef835'/>
<id>urn:sha1:2c91ab7262e6b08bbc76b83ed1981602fa6ef835</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch2_dev_get_ioref2(); debug.c</title>
<updated>2024-05-09T20:23:35+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-05-03T16:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91ffdecfc796e79ce9d6ae1cf052afebbda8b01e'/>
<id>urn:sha1:91ffdecfc796e79ce9d6ae1cf052afebbda8b01e</id>
<content type='text'>
Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: member helper cleanups</title>
<updated>2024-05-08T21:29:19+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-04-12T03:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f724563fcd76166b9922c506078a4afa4e3a90a'/>
<id>urn:sha1:2f724563fcd76166b9922c506078a4afa4e3a90a</id>
<content type='text'>
Some renaming for better consistency

bch2_member_exists	-&gt; bch2_member_alive
bch2_dev_exists		-&gt; bch2_member_exists
bch2_dev_exsits2	-&gt; bch2_dev_exists
bch_dev_locked		-&gt; bch2_dev_locked
bch_dev_bkey_exists	-&gt; bch2_dev_bkey_exists

new helper - bch2_dev_safe

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: iter/update/trigger/str_hash flag cleanup</title>
<updated>2024-05-08T21:29:18+00:00</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2024-04-07T22:05:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5dd8c60e1e044816d789098ce2454a130e06b03d'/>
<id>urn:sha1:5dd8c60e1e044816d789098ce2454a130e06b03d</id>
<content type='text'>
Combine iter/update/trigger/str_hash flags into a single enum, and
x-macroize them for a to_text() function later.

These flags are all for a specific iter/key/update context, so it makes
sense to group them together - iter/update/trigger flags were already
given distinct bits, this cleans up and unifies that handling.

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