<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/tests, 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-07-06T09:04:10Z</updated>
<entry>
<title>btrfs: use unsigned types for constants defined as bit shifts</title>
<updated>2025-07-06T09:04:10Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2025-04-22T15:55:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce656e5ac66417aad38a033d6ff8ec5f3e4b113f'/>
<id>urn:sha1:ce656e5ac66417aad38a033d6ff8ec5f3e4b113f</id>
<content type='text'>
[ Upstream commit 05a6ec865d091fe8244657df8063f74e704d1711 ]

The unsigned type is a recommended practice (CWE-190, CWE-194) for bit
shifts to avoid problems with potential unwanted sign extensions.
Although there are no such cases in btrfs codebase, follow the
recommendation.

Reviewed-by: Boris Burkov &lt;boris@bur.io&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
Stable-dep-of: 1f2889f5594a ("btrfs: fix qgroup reservation leak on failure to allocate ordered extent")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>btrfs: tests: fix chunk map leak after failure to add it to the tree</title>
<updated>2025-03-18T19:35:51Z</updated>
<author>
<name>Filipe Manana</name>
</author>
<published>2025-03-11T15:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=009ca358486ded9b4822eddb924009b6848d7271'/>
<id>urn:sha1:009ca358486ded9b4822eddb924009b6848d7271</id>
<content type='text'>
If we fail to add the chunk map to the fs mapping tree we exit
test_rmap_block() without freeing the chunk map. Fix this by adding a
call to btrfs_free_chunk_map() before exiting the test function if the
call to btrfs_add_chunk_map() failed.

Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps")
CC: stable@vger.kernel.org # 6.12+
Reviewed-by: Boris Burkov &lt;boris@bur.io&gt;
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: merge alloc_dummy_extent_buffer() helpers</title>
<updated>2025-03-18T19:35:47Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2025-02-26T08:22:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db3a1bac3f087ec7568d275a0d2cb0acc4a20332'/>
<id>urn:sha1:db3a1bac3f087ec7568d275a0d2cb0acc4a20332</id>
<content type='text'>
After previous patch removing nodesize from parameters,
__alloc_dummy_extent_buffer() and alloc_dummy_extent_buffer() are
identical so we can drop one.

Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: don't pass nodesize to __alloc_extent_buffer()</title>
<updated>2025-03-18T19:35:47Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2025-02-26T08:22:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=551561c34663e8fc32aff8824d68288b87498ba1'/>
<id>urn:sha1:551561c34663e8fc32aff8824d68288b87498ba1</id>
<content type='text'>
All callers pass a valid fs_info so we can read the nodesize from that
instead of passing it as parameter.

Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: fix btrfs_test_delayed_refs() leak of transaction</title>
<updated>2025-02-17T16:24:14Z</updated>
<author>
<name>David Disseldorp</name>
</author>
<published>2025-02-10T11:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=290237fde9491ca26cf4020bbf5a2b330452e7db'/>
<id>urn:sha1:290237fde9491ca26cf4020bbf5a2b330452e7db</id>
<content type='text'>
The btrfs_transaction struct leaks, which can cause sporadic fstests
failures when kmemleak checking is enabled:

kmemleak: 5 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
&gt; cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff88810fdc6c00 (size 512):
  comm "modprobe", pid 203, jiffies 4294892552
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace (crc 6736050f):
    __kmalloc_cache_noprof+0x133/0x2c0
    btrfs_test_delayed_refs+0x6f/0xbb0 [btrfs]
    btrfs_run_sanity_tests.cold+0x91/0xf9 [btrfs]
    0xffffffffa02fd055
    do_one_initcall+0x49/0x1c0
    do_init_module+0x5b/0x1f0
    init_module_from_file+0x70/0x90
    idempotent_init_module+0xe8/0x2c0
    __x64_sys_finit_module+0x6b/0xd0
    do_syscall_64+0x54/0x110
    entry_SYSCALL_64_after_hwframe+0x76/0x7e

The transaction struct was initially stack-allocated but switched to
heap following frame size compiler warnings.

Fixes: 2b34879d97e27 ("btrfs: selftests: add delayed ref self test cases")
Signed-off-by: David Disseldorp &lt;ddiss@suse.de&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: add a selftest for deleting two out of three extents</title>
<updated>2025-01-14T14:57:55Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2025-01-13T19:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d0c23db26cb58c9fc6ee8817e8f9ebeb25776e5'/>
<id>urn:sha1:9d0c23db26cb58c9fc6ee8817e8f9ebeb25776e5</id>
<content type='text'>
Add a selftest creating three extents and then deleting two out of the
three extents.

Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: add test for punching a hole into 3 RAID stripe-extents</title>
<updated>2025-01-14T14:56:40Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2025-01-13T19:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfda28fb706d53b332d5183d6091224289e96863'/>
<id>urn:sha1:cfda28fb706d53b332d5183d6091224289e96863</id>
<content type='text'>
Test creating a range of three RAID stripe-extents and then punch a hole
in the middle, deleting all of the middle extents and partially deleting
the "book ends".

Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: add selftest for punching holes into the RAID stripe extents</title>
<updated>2025-01-14T14:54:45Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2025-01-13T19:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27ae15b25b6e892a4161bc33c7f2b8a356318a2c'/>
<id>urn:sha1:27ae15b25b6e892a4161bc33c7f2b8a356318a2c</id>
<content type='text'>
Add a selftest for punching a hole into a RAID stripe extent. The test
create an 1M extent and punches a 64k bytes long hole at offset of 32k from
the start of the extent.

Afterwards it verifies the start and length of both resulting new extents
"left" and "right" as well as the absence of the hole.

Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: test RAID stripe-tree deletion spanning two items</title>
<updated>2025-01-14T14:54:44Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2025-01-13T19:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d395c3926d8996918ca29a67fe194e7088491d9'/>
<id>urn:sha1:1d395c3926d8996918ca29a67fe194e7088491d9</id>
<content type='text'>
Add a selftest for RAID stripe-tree deletion with a delete range spanning
two items, so that we're punching a hole into two adjacent RAID stripe
extents truncating the first and "moving" the second to the right.

The following diagram illustrates the operation:

 |--- RAID Stripe Extent ---||--- RAID Stripe Extent ---|
 |-----  keep  -----|--- drop ---|-----  keep  ----|

Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: don't split RAID extents in half</title>
<updated>2025-01-14T14:52:30Z</updated>
<author>
<name>Johannes Thumshirn</name>
</author>
<published>2025-01-13T19:31:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0afdec2552cf1ae059d58c3ffaa83aae7ddbfe1'/>
<id>urn:sha1:a0afdec2552cf1ae059d58c3ffaa83aae7ddbfe1</id>
<content type='text'>
The selftests for partially deleting the start or tail of RAID
stripe-extents split these extents in half.

This can hide errors in the calculation, so don't split the RAID
stripe-extents in half but delete the first or last 16K of the 64K
extents.

Reviewed-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
</feed>
