<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/fs/btrfs/tests, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/fs/btrfs/tests?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/fs/btrfs/tests?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-16T15:15:57Z</updated>
<entry>
<title>btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray</title>
<updated>2022-05-16T15:15:57Z</updated>
<author>
<name>Gabriel Niebler</name>
<email>gniebler@suse.com</email>
</author>
<published>2022-05-03T10:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=48b36a602a335c184505346b5b37077840660634'/>
<id>urn:sha1:48b36a602a335c184505346b5b37077840660634</id>
<content type='text'>
… rename it to simply fs_roots and adjust all usages of this object to use
the XArray API, because it is notionally easier to use and understand, as
it provides array semantics, and also takes care of locking for us,
further simplifying the code.

Also do some refactoring, esp. where the API change requires largely
rewriting some functions, anyway.

Reviewed-by: Nikolay Borisov &lt;nborisov@suse.com&gt;
Signed-off-by: Gabriel Niebler &lt;gniebler@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: turn fs_info member buffer_radix into XArray</title>
<updated>2022-05-16T15:03:16Z</updated>
<author>
<name>Gabriel Niebler</name>
<email>gniebler@suse.com</email>
</author>
<published>2022-04-21T15:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8ee922689d67b7cfa6acbe2aa1ee76ac72e6fc8a'/>
<id>urn:sha1:8ee922689d67b7cfa6acbe2aa1ee76ac72e6fc8a</id>
<content type='text'>
… named 'extent_buffers'. Also adjust all usages of this object to use
the XArray API, which greatly simplifies the code as it takes care of
locking and is generally easier to use and understand, providing
notionally simpler array semantics.

Also perform some light refactoring.

Reviewed-by: Nikolay Borisov &lt;nborisov@suse.com&gt;
Signed-off-by: Gabriel Niebler &lt;gniebler@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: assert we have a write lock when removing and replacing extent maps</title>
<updated>2022-03-14T12:13:50Z</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2022-02-03T15:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6d3b050efa079f5bc4d5e2a8f37f0dc0345a2096'/>
<id>urn:sha1:6d3b050efa079f5bc4d5e2a8f37f0dc0345a2096</id>
<content type='text'>
Removing or replacing an extent map requires holding a write lock on the
extent map's tree. We currently do that everywhere, except in one of the
self tests, where it's harmless since there's no concurrency.

In order to catch possible races in the future, assert that we are holding
a write lock on the extent map tree before removing or replacing an extent
map in the tree, and update the self test to obtain a write lock before
removing extent maps.

Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: selftests: dump extent io tree if extent-io-tree test failed</title>
<updated>2022-01-07T13:18:27Z</updated>
<author>
<name>Qu Wenruo</name>
<email>wqu@suse.com</email>
</author>
<published>2021-12-30T08:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=856e47946c6da280816ed9b9c32083c102838ba0'/>
<id>urn:sha1:856e47946c6da280816ed9b9c32083c102838ba0</id>
<content type='text'>
When code modifying extent-io-tree get modified and got that selftest
failed, it can take some time to pin down the cause.

To make it easier to expose the problem, dump the extent io tree if the
selftest failed.

This can save developers debug time, especially since the selftest we
can not use the trace events, thus have to manually add debug trace
points.

Reviewed-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Signed-off-by: Qu Wenruo &lt;wqu@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: track the csum, extent, and free space trees in a rb tree</title>
<updated>2022-01-03T14:09:50Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-11-05T20:45:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=abed4aaae4f71a7bcdbe90a65319b6e772a2689d'/>
<id>urn:sha1:abed4aaae4f71a7bcdbe90a65319b6e772a2689d</id>
<content type='text'>
In the future we are going to have multiple copies of these trees.  To
facilitate this we need a way to lookup the different roots we are
looking for.  Handle this by adding a global root rb tree that is
indexed on the root-&gt;root_key.  Then instead of loading the roots at
mount time with individually targeted keys, simply search the tree_root
for anything with the specific objectid we want.  This will make it
straightforward to support both old style and new style file systems.

Signed-off-by: Josef Bacik &lt;josef@toxicpanda.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: stop accessing -&gt;free_space_root directly</title>
<updated>2022-01-03T14:09:49Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-11-05T20:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7939dd9f35f6f76f5ee199851bcb4d89cd7be061'/>
<id>urn:sha1:7939dd9f35f6f76f5ee199851bcb4d89cd7be061</id>
<content type='text'>
We're going to have multiple free space roots in the future, so adjust
all the users of the free space root to use a helper to access the root.

Signed-off-by: Josef Bacik &lt;josef@toxicpanda.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: stop accessing -&gt;extent_root directly</title>
<updated>2022-01-03T14:09:49Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-11-05T20:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=29cbcf401793f4e2c871c846edc2191731df2c41'/>
<id>urn:sha1:29cbcf401793f4e2c871c846edc2191731df2c41</id>
<content type='text'>
When we start having multiple extent roots we'll need to use a helper to
get to the correct extent_root.  Rename fs_info-&gt;extent_root to
_extent_root and convert all of the users of the extent root to using
the btrfs_extent_root() helper.  This will allow us to easily clean up
the remaining direct accesses in the future.

Signed-off-by: Josef Bacik &lt;josef@toxicpanda.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: add self test for bytes_index free space cache</title>
<updated>2022-01-03T14:09:46Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-11-18T21:33:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bbf27275f246a105a1e906f22a4f814f89bf4b55'/>
<id>urn:sha1:bbf27275f246a105a1e906f22a4f814f89bf4b55</id>
<content type='text'>
I noticed a few corner cases when looking at my bytes_index patch for
obvious bugs, so add a bunch of tests to validate proper behavior of the
bytes_index tree.  A couple of basic tests to make sure it puts things
in the correct order, and then more complicated tests to make sure it
re-arranges bitmap entries properly and does the right thing when we try
to make allocations.

Signed-off-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: drop the _nr from the item helpers</title>
<updated>2022-01-03T14:09:43Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-10-21T18:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3212fa14e772913b69e85e080678472f8f1aecde'/>
<id>urn:sha1:3212fa14e772913b69e85e080678472f8f1aecde</id>
<content type='text'>
Now that all call sites are using the slot number to modify item values,
rename the SETGET helpers to raw_item_*(), and then rework the _nr()
helpers to be the btrfs_item_*() btrfs_set_item_*() helpers, and then
rename all of the callers to the new helpers.

Signed-off-by: Josef Bacik &lt;josef@toxicpanda.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: use btrfs_item_size_nr/btrfs_item_offset_nr everywhere</title>
<updated>2022-01-03T14:09:42Z</updated>
<author>
<name>Josef Bacik</name>
<email>josef@toxicpanda.com</email>
</author>
<published>2021-10-21T18:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=227f3cd0d5a157c30480e2cd95f4271be1ace7bc'/>
<id>urn:sha1:227f3cd0d5a157c30480e2cd95f4271be1ace7bc</id>
<content type='text'>
We have this pattern in a lot of places

	item = btrfs_item_nr(slot);
	btrfs_item_size(leaf, item);

when we could simply use

	btrfs_item_size(leaf, slot);

Fix all callers of btrfs_item_size() and btrfs_item_offset() to use the
_nr variation of the helpers.

Reviewed-by: Qu Wenruo &lt;wqu@suse.com&gt;
Signed-off-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
</feed>
