<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs, branch v2022.04</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>squashfs: show an error message if the inode_table can't be, allocated</title>
<updated>2022-01-29T12:46:46+00:00</updated>
<author>
<name>Lars Weber</name>
<email>weber@weber-software.com</email>
</author>
<published>2022-01-13T13:28:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1e69db57e64249f7f7a5a282a3a2f1b053be3f6f'/>
<id>1e69db57e64249f7f7a5a282a3a2f1b053be3f6f</id>
<content type='text'>
Signed-off-by: Lars Weber &lt;weber@weber-software.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lars Weber &lt;weber@weber-software.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: replace @return by Return:</title>
<updated>2022-01-19T17:11:34+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2022-01-19T17:05:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=185f812c419f1b4f0d10d9787d59cf9f11a2a600'/>
<id>185f812c419f1b4f0d10d9787d59cf9f11a2a600</id>
<content type='text'>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sphinx expects Return: and not @return to indicate a return value.

find . -name '*.c' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

find . -name '*.h' -exec \
sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \;

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/btrfs: fix a bug that U-boot fs btrfs implementation doesn't handle NO_HOLE feature correctly</title>
<updated>2022-01-18T13:31:02+00:00</updated>
<author>
<name>Qu Wenruo</name>
<email>wqu@suse.com</email>
</author>
<published>2021-12-27T06:11:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c075433feb95b34e762edd384e76a5d08f73ad9'/>
<id>7c075433feb95b34e762edd384e76a5d08f73ad9</id>
<content type='text'>
[BUG]
When passing a btrfs with NO_HOLE feature to U-boot, and if one file
contains holes, then the hash of the file is not correct in U-boot:

 # mkfs.btrfs -f test.img	# Since v5.15, mkfs defaults to NO_HOLES
 # mount test.img /mnt/btrfs
 # xfs_io -f -c "pwrite 0 4k" -c "pwrite 8k 4k" /mnt/btrfs/file
 # md5sum /mnt/btrfs/file
 277f3840b275c74d01e979ea9d75ac19  /mnt/btrfs/file
 # umount /mnt/btrfs
 # ./u-boot
 =&gt; host bind 0 /home/adam/test.img
 =&gt; ls host 0
 &lt;   &gt;      12288  Mon Dec 27 05:35:23 2021  file
 =&gt; load host 0 0x1000000 file
 12288 bytes read in 0 ms
 =&gt; md5sum 0x1000000 0x3000
 md5 for 01000000 ... 01002fff ==&gt; 855ffdbe4d0ccc5acab92e1b5330e4c1

The md5sum doesn't match at all.

[CAUSE]
In U-boot btrfs implementation, the function btrfs_read_file() has the
following iteration for file extent iteration:

	/* Read the aligned part */
	while (cur &lt; aligned_end) {
		ret = lookup_data_extent(root, &amp;path, ino, cur, &amp;next_offset);
		if (ret &lt; 0)
			goto out;
		if (ret &gt; 0) {
			/* No next, direct exit */
			if (!next_offset) {
				ret = 0;
				goto out;
			}
		}
		/* Read file extent */

But for NO_HOLES features, hole extents will not have any extent item
for it.
Thus if @cur is at a hole, lookup_data_extent() will just return &gt;0, and
update @next_offset.

But we still believe there is some data to read for @cur for ret &gt; 0
case, causing we read extent data from the next file extent.

This means, what we do for above NO_HOLES btrfs is:
- Read 4K data from disk to file offset [0, 4K)
  So far the data is still correct

- Read 4K data from disk to file offset [4K, 8K)
  We didn't skip the 4K hole, but read the data at file offset [8K, 12K)
  into file offset [4K, 8K).

  This causes the checksum mismatch.

[FIX]
Add extra check to skip to the next non-hole range after
lookup_data_extent().

Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[BUG]
When passing a btrfs with NO_HOLE feature to U-boot, and if one file
contains holes, then the hash of the file is not correct in U-boot:

 # mkfs.btrfs -f test.img	# Since v5.15, mkfs defaults to NO_HOLES
 # mount test.img /mnt/btrfs
 # xfs_io -f -c "pwrite 0 4k" -c "pwrite 8k 4k" /mnt/btrfs/file
 # md5sum /mnt/btrfs/file
 277f3840b275c74d01e979ea9d75ac19  /mnt/btrfs/file
 # umount /mnt/btrfs
 # ./u-boot
 =&gt; host bind 0 /home/adam/test.img
 =&gt; ls host 0
 &lt;   &gt;      12288  Mon Dec 27 05:35:23 2021  file
 =&gt; load host 0 0x1000000 file
 12288 bytes read in 0 ms
 =&gt; md5sum 0x1000000 0x3000
 md5 for 01000000 ... 01002fff ==&gt; 855ffdbe4d0ccc5acab92e1b5330e4c1

The md5sum doesn't match at all.

[CAUSE]
In U-boot btrfs implementation, the function btrfs_read_file() has the
following iteration for file extent iteration:

	/* Read the aligned part */
	while (cur &lt; aligned_end) {
		ret = lookup_data_extent(root, &amp;path, ino, cur, &amp;next_offset);
		if (ret &lt; 0)
			goto out;
		if (ret &gt; 0) {
			/* No next, direct exit */
			if (!next_offset) {
				ret = 0;
				goto out;
			}
		}
		/* Read file extent */

But for NO_HOLES features, hole extents will not have any extent item
for it.
Thus if @cur is at a hole, lookup_data_extent() will just return &gt;0, and
update @next_offset.

But we still believe there is some data to read for @cur for ret &gt; 0
case, causing we read extent data from the next file extent.

This means, what we do for above NO_HOLES btrfs is:
- Read 4K data from disk to file offset [0, 4K)
  So far the data is still correct

- Read 4K data from disk to file offset [4K, 8K)
  We didn't skip the 4K hole, but read the data at file offset [8K, 12K)
  into file offset [4K, 8K).

  This causes the checksum mismatch.

[FIX]
Add extra check to skip to the next non-hole range after
lookup_data_extent().

Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/btrfs: add dependency on BLAKE2 hash</title>
<updated>2022-01-18T13:31:02+00:00</updated>
<author>
<name>Qu Wenruo</name>
<email>wqu@suse.com</email>
</author>
<published>2021-12-27T06:12:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1617165a172ea1768c9cb12cde536f1da252546e'/>
<id>1617165a172ea1768c9cb12cde536f1da252546e</id>
<content type='text'>
Now btrfs can utilize the newly intorudced BLAKE2 hash.

Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now btrfs can utilize the newly intorudced BLAKE2 hash.

Signed-off-by: Qu Wenruo &lt;wqu@suse.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CONFIG_JFFS2_DEV et al to Kconfig</title>
<updated>2021-12-27T21:20:19+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-12-17T23:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=968c6210e6bc4c76edeeacc16f02aef2a14dd96f'/>
<id>968c6210e6bc4c76edeeacc16f02aef2a14dd96f</id>
<content type='text'>
This converts the following to Kconfig:
   CONFIG_JFFS2_DEV
   CONFIG_JFFS2_LZO
   CONFIG_JFFS2_NAND
   CONFIG_JFFS2_PART_OFFSET
   CONFIG_JFFS2_PART_SIZE

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This converts the following to Kconfig:
   CONFIG_JFFS2_DEV
   CONFIG_JFFS2_LZO
   CONFIG_JFFS2_NAND
   CONFIG_JFFS2_PART_OFFSET
   CONFIG_JFFS2_PART_SIZE

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: yaffs2: Finish Kconfig migration</title>
<updated>2021-11-05T15:23:29+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-10-20T01:10:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2ad74301a0a8542ff7672df2ab45d27e6286e0e2'/>
<id>2ad74301a0a8542ff7672df2ab45d27e6286e0e2</id>
<content type='text'>
For the symbols which are both hard-coded as enabled and used, move to
Kconfig.  The rest of the CONFIG_YAFFS namespace is unselected anywhere,
so we leave it as is.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the symbols which are both hard-coded as enabled and used, move to
Kconfig.  The rest of the CONFIG_YAFFS namespace is unselected anywhere,
so we leave it as is.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge https://source.denx.de/u-boot/custodians/u-boot-spi</title>
<updated>2021-10-23T14:49:28+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2021-10-23T14:49:28+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=355d1e24f6143c4839be3c015c191421c4e9449c'/>
<id>355d1e24f6143c4839be3c015c191421c4e9449c</id>
<content type='text'>
- Fix mtd erase with mtdpart (Marek Behún)
- NXP fspi driver fixes (Kuldeep Singh)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix mtd erase with mtdpart (Marek Behún)
- NXP fspi driver fixes (Kuldeep Singh)
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: Remove mtd_erase_callback() entirely</title>
<updated>2021-10-23T10:17:33+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2021-10-05T13:56:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d1ecc99cb59c2190257f7738f91db21f174dc02'/>
<id>0d1ecc99cb59c2190257f7738f91db21f174dc02</id>
<content type='text'>
The original purpose of mtd_erase_callback() in Linux at the time it was
imported to U-Boot, was to inform the caller that erasing is done (since
it was an asynchronous operation).

All supplied callback methods in U-Boot do nothing, but the
mtd_erase_callback() function was (until previous patch) grossly abused
in U-Boot's mtdpart implementation for completely different purpose.

Since we got rid of the abusement, remove the mtd_erase_callback()
function and the .callback member from struct erase_info entirely, in
order to avoid such problems in the future.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original purpose of mtd_erase_callback() in Linux at the time it was
imported to U-Boot, was to inform the caller that erasing is done (since
it was an asynchronous operation).

All supplied callback methods in U-Boot do nothing, but the
mtd_erase_callback() function was (until previous patch) grossly abused
in U-Boot's mtdpart implementation for completely different purpose.

Since we got rid of the abusement, remove the mtd_erase_callback()
function and the .callback member from struct erase_info entirely, in
order to avoid such problems in the future.

Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs: fat: check for buffer size before reading blocks</title>
<updated>2021-10-12T20:49:21+00:00</updated>
<author>
<name>Ricardo Salveti</name>
<email>ricardo@foundries.io</email>
</author>
<published>2021-09-26T18:36:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=41130eb8937e43b2307fb67ebb60f0190fc01438'/>
<id>41130eb8937e43b2307fb67ebb60f0190fc01438</id>
<content type='text'>
This patch optimizes the commit mentioned below by avoiding running
a set of commands which are useless in the case when
size &lt; mydata-&gt;sect_size and sect_count would be 0.

Fixes: 5b3ddb17ba ("fs/fat/fat.c: Do not perform zero block reads if there are no blocks left")

Signed-off-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Co-developed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch optimizes the commit mentioned below by avoiding running
a set of commands which are useless in the case when
size &lt; mydata-&gt;sect_size and sect_count would be 0.

Fixes: 5b3ddb17ba ("fs/fat/fat.c: Do not perform zero block reads if there are no blocks left")

Signed-off-by: Ricardo Salveti &lt;ricardo@foundries.io&gt;
Co-developed-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
Signed-off-by: Oleksandr Suvorov &lt;oleksandr.suvorov@foundries.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: Use U-Boot API for decompression</title>
<updated>2021-10-08T19:53:26+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-09-25T13:03:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=918adf8e07337719750c57be0939824247973b1e'/>
<id>918adf8e07337719750c57be0939824247973b1e</id>
<content type='text'>
Use the common function to avoid code duplication.

Acked-by: Qu Wenruo &lt;wqu@suse.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the common function to avoid code duplication.

Acked-by: Qu Wenruo &lt;wqu@suse.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
