<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/fs/btrfs, branch master</title>
<subtitle>Broadcom-s U-Boot</subtitle>
<id>https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/bcm63xx/u-boot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/'/>
<updated>2019-05-05T12:48:50Z</updated>
<entry>
<title>fs: btrfs: add zstd decompression support</title>
<updated>2019-05-05T12:48:50Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2019-04-29T20:40:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=53290e6efdc10b5a40955fa4c5b0960651180bf2'/>
<id>urn:sha1:53290e6efdc10b5a40955fa4c5b0960651180bf2</id>
<content type='text'>
This adds decompression support for Zstandard, which has been included
in Linux btrfs driver for some time.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: fix btrfs methods return values on failure</title>
<updated>2019-05-03T11:30:31Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2019-05-02T13:28:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=cd22e34c11e7211c54d31f854672fa26185990a5'/>
<id>urn:sha1:cd22e34c11e7211c54d31f854672fa26185990a5</id>
<content type='text'>
The btrfs implementation methods .ls(), .size() and .read() returns 1 on
failure, but the command handlers expect values &lt;0 on failure.

For example if given a nonexistent path, the load command currently
returns success, and hush scripting does not work.

Fix this by setting return values of these methods to -1 instead of 1 on
failure.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: Do not print mount fail message when not btrfs filesystem</title>
<updated>2019-05-03T11:23:17Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2019-04-26T13:11:09Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=881e020958f4f0fb59d56795b833316b9a634436'/>
<id>urn:sha1:881e020958f4f0fb59d56795b833316b9a634436</id>
<content type='text'>
Other filesystem drivers don't do this.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>Revert "fs: btrfs: fix false negatives in ROOT_ITEM search"</title>
<updated>2019-04-27T15:35:44Z</updated>
<author>
<name>Tom Rini</name>
</author>
<published>2019-04-27T15:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=6aebc0d11a10f48a54146c5e71bbef15a1a458fc'/>
<id>urn:sha1:6aebc0d11a10f48a54146c5e71bbef15a1a458fc</id>
<content type='text'>
Per Pierre this change shouldn't have been applied as it was superseded
by "fs: btrfs: fix btrfs_search_tree invalid results" which is also
applied now as 1627e5e5985d.

This reverts commit 633967f9818cb6a0e87ffa8cba33148a5bcc6edb.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: fix btrfs_search_tree invalid results</title>
<updated>2019-04-26T21:53:16Z</updated>
<author>
<name>Pierre Bourdon</name>
</author>
<published>2019-04-16T00:47:14Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=1627e5e5985d92bebdbfb19ab783eaf69337900e'/>
<id>urn:sha1:1627e5e5985d92bebdbfb19ab783eaf69337900e</id>
<content type='text'>
btrfs_search_tree should return the first item in the tree that is
greater or equal to the searched item.

The search algorithm did not properly handle the edge case where the
searched item is higher than the last item of the node but lower than
the first item of the next node. Instead of properly returning the first
item of the next node, it was returning an invalid path pointer
(pointing to a non-existent item after the last item of the node + 1).

This fixes two issues in the btrfs driver:
  - Looking for a ROOT_ITEM could fail if it was the first item of its
    leaf node.
  - Iterating through DIR_INDEX entries (for readdir) could fail if the
    first DIR_INDEX entry was the first item of a leaf node.

Signed-off-by: Pierre Bourdon &lt;delroth@gmail.com&gt;
Cc: Marek Behun &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: fix false negatives in ROOT_ITEM search</title>
<updated>2019-04-26T21:53:15Z</updated>
<author>
<name>Pierre Bourdon</name>
</author>
<published>2019-04-13T21:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=633967f9818cb6a0e87ffa8cba33148a5bcc6edb'/>
<id>urn:sha1:633967f9818cb6a0e87ffa8cba33148a5bcc6edb</id>
<content type='text'>
ROOT_ITEMs in btrfs are referenced without knowing their actual "offset"
value. To perform these searches using only two items from the key, the
btrfs driver uses a special "btrfs_search_tree_key_type" function.

The algorithm used by that function to transform a 3-tuple search into a
2-tuple search was subtly broken, leading to items not being found if
they were the first in their tree node.

This commit fixes btrfs_search_tree_key_type to properly behave in these
situations.

Signed-off-by: Pierre Bourdon &lt;delroth@gmail.com&gt;
Cc: Marek Behun &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: Fix tree traversal with btrfs_next_slot()</title>
<updated>2018-10-08T18:45:02Z</updated>
<author>
<name>Yevgeny Popovych</name>
</author>
<published>2018-09-07T09:59:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=5b781cf08dfbde906809a2d4741012f9ca972320'/>
<id>urn:sha1:5b781cf08dfbde906809a2d4741012f9ca972320</id>
<content type='text'>
When traversing slots in a btree (via btrfs_path) with btrfs_next_slot(),
we didn't correctly identify that the last slot in the leaf was reached
and we should jump to the next leaf.

This could lead to any kind of runtime errors or corruptions, like:
* file data not being read at all, or is read partially
* file is read but is corrupted
* (any) metadata being corrupted or not read at all, etc

The easiest way to reproduce this is to read a large enough file that
its EXTENT_DATA items don't fit into a single leaf.

Signed-off-by: Yevgeny Popovych &lt;yevgenyp@pointgrab.com&gt;
Cc: Marek Behun &lt;marek.behun@nic.cz&gt;
Tested-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: Fix cache alignment bugs</title>
<updated>2018-09-30T17:00:37Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2018-09-22T02:13:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=c9795396edd53ad29537037de8fd752662c676ad'/>
<id>urn:sha1:c9795396edd53ad29537037de8fd752662c676ad</id>
<content type='text'>
The btrfs implementation passes cache-unaligned buffers into the
block layer, which triggers cache alignment problems down in the
block device drivers. Align the buffers to prevent this.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Marek Behun &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: Fix wrong comparison in logical to physical mapping</title>
<updated>2018-07-20T19:37:44Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2018-07-04T18:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=f8c173b6a0b7695089d5ec48cb5b320863c91fdf'/>
<id>urn:sha1:f8c173b6a0b7695089d5ec48cb5b320863c91fdf</id>
<content type='text'>
The comparison
  logical &gt; item-&gt;logical + item-&gt;length
in btrfs_map_logical_to_physical is wrong and should be instead
  logical &gt;= item-&gt;logical + item-&gt;length
For example, if
  item-&gt;logical = 4096
  item-&gt;length = 4096
and we are looking for logical = 8192, it is not part of item (item is
[4096, 8191]). But the comparison is false and we think we have found
the correct item, although we should be searing in the right subtree.

This fixes some bugs I encountered.

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;
</content>
</entry>
<entry>
<title>fs: btrfs: Do not fail when all root_backups are empty</title>
<updated>2018-06-18T18:43:12Z</updated>
<author>
<name>Yevgeny Popovych</name>
</author>
<published>2018-06-11T11:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=d146a7b9c6200c7a84a15208f0c06e0ab60890dd'/>
<id>urn:sha1:d146a7b9c6200c7a84a15208f0c06e0ab60890dd</id>
<content type='text'>
This is the case when reading freshly created filesystem.
The error message is like the following:
    btrfs_read_superblock: No valid root_backup found!

Since the data from super_roots/root_backups is not actually used -
decided to rework btrfs_newest_root_backup() into
btrfs_check_super_roots() that will only check if super_roots
array is valid and correctly handle empty scenario.

As a result:
* btrfs_read_superblock() now only checks if super_roots array is valid;
  the case when it is empty is considered OK.
* removed root_backup pointer from btrfs_info,
  which would be NULL in case of empty super_roots.
* btrfs_read_superblock() verifies number of devices from the superblock
  itself, not newest root_backup.

Signed-off-by: Yevgeny Popovych &lt;yevgenyp@pointgrab.com&gt;
Cc: Marek Behun &lt;marek.behun@nic.cz&gt;
Cc: Sergey Struzh &lt;sergeys@pointgrab.com&gt;
</content>
</entry>
</feed>
