<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm63xx/u-boot/fs/ext4, 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-04-10T00:04:06Z</updated>
<entry>
<title>Fix ext4 block group descriptor sizing</title>
<updated>2019-04-10T00:04:06Z</updated>
<author>
<name>Benjamin Lim</name>
</author>
<published>2019-03-29T11:29:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=febbc583319b567fe3d83e521cc2ace9be8d1501'/>
<id>urn:sha1:febbc583319b567fe3d83e521cc2ace9be8d1501</id>
<content type='text'>
Ext4 allows for arbitrarily sized block group descriptors when 64-bit
addressing is enabled, which was previously not properly supported. This
patch dynamically allocates a chunk of memory of the correct size.

Signed-off-by: Benjamin Lim &lt;jarsp.ctf@gmail.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: Problem with ext4load and sparse files</title>
<updated>2019-04-10T00:04:03Z</updated>
<author>
<name>Gero Schumacher</name>
</author>
<published>2019-02-26T15:45:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=1c48fda3e5a88159130b4d4805fbdf367212afab'/>
<id>urn:sha1:1c48fda3e5a88159130b4d4805fbdf367212afab</id>
<content type='text'>
Hi,

when I try to load a sparse file via ext4load, I am getting the error message
'invalid extent'

After a deeper look in the code, it seems to be an issue in the function ext4fs_get_extent_block in fs/ext4/ext4_common.c:

The file starts with 1k of zeros. The blocksize is 1024. So the first extend block contains the following information:

eh_entries: 1
eh_depth: 1
ei_block 1

When the upper layer (ext4fs_read_file) asks for fileblock 0, we are running in the 'invalid extent' error message.
For me it seems, that the code is not prepared for handling a sparse block at the beginning of the file. The following change, solved my problem:

I am really not an expert in ext4 filesystems. Can somebody please have a look at this issue and give me a feedback, if I am totally wrong or not?
</content>
</entry>
<entry>
<title>fs: ext4: Add support for the creation of symbolic links</title>
<updated>2019-04-10T00:03:30Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
</author>
<published>2019-02-13T11:15:25Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=5efc0686eebc0c0daabfbfc2c403f8251b468526'/>
<id>urn:sha1:5efc0686eebc0c0daabfbfc2c403f8251b468526</id>
<content type='text'>
Re-use the functions used to write/create a file, to support creation of a
symbolic link.
The difference with a regular file are small:
- The inode mode is flagged with S_IFLNK instead of S_IFREG
- The ext2_dirent's filetype is FILETYPE_SYMLINK instead of FILETYPE_REG
- Instead of storing the content of a file in allocated blocks, the path
to the target is stored. And if the target's path is short enough, no block
is allocated and the target's path is stored in ext2_inode.b.symlink

As with regulars files, if a file/symlink with the same name exits, it is
unlinked first and then re-created.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
[trini: Fix ext4 env code]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: constify the buffer passed to write functions</title>
<updated>2019-04-09T19:34:15Z</updated>
<author>
<name>Jean-Jacques Hiblot</name>
</author>
<published>2019-02-13T11:15:24Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=b000180b0f467851525aae3d0dfb8ab3a9dbcf8f'/>
<id>urn:sha1:b000180b0f467851525aae3d0dfb8ab3a9dbcf8f</id>
<content type='text'>
There is no need to modify the buffer passed to ext4fs_write_file().
The memset() call is not required here and was likely copied from the
equivalent part of the ext4fs_read_file() function where we do need it.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: cache extent data</title>
<updated>2019-04-09T19:34:15Z</updated>
<author>
<name>Stephen Warren</name>
</author>
<published>2019-01-30T19:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=d5aee659f217746395ff58adf3a863627ff02ec1'/>
<id>urn:sha1:d5aee659f217746395ff58adf3a863627ff02ec1</id>
<content type='text'>
When a file contains extents, U-Boot currently reads extent-related data
for each block in the file, even if that data is located in the same
block each time. This significantly slows down loading of files that use
extents. Implement a very dumb cache to prevent repeatedly reading the
same block. Files with extents now load as fast as files without.

Note: There are many cases where read_allocated_block() is called. This
patch only addresses one of those places; all others still read redundant
data in any case they did before. This is a minimal patch to fix the
load command; other cases aren't fixed.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: do not write on filesystem with metadata_csum feature</title>
<updated>2019-03-22T16:15:24Z</updated>
<author>
<name>Sébastien Szymanski</name>
</author>
<published>2019-03-22T08:33:52Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=2e7365518acdb8fb6e9be332c8a6c57b457188d9'/>
<id>urn:sha1:2e7365518acdb8fb6e9be332c8a6c57b457188d9</id>
<content type='text'>
U-Boot doesn't support metadata_csum feature. Writing to filesystem with
metadata_csum feature makes the filesystem corrupted and unbootable by
Linux:

[    2.527495] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 0 failed (52188!=0)
[    2.537421] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 1 failed (5262!=0)
...
[    2.653308] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 14 failed (42611!=0)
[    2.662179] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 15 failed (21527!=0)
[    2.687920] JBD2: journal checksum error
[    2.691982] EXT4-fs (mmcblk0p2): error loading journal
[    2.698292] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -74

Don't write to filesystem with meatadata_csum feature to not corrupt the
filesystem.

Signed-off-by: Sébastien Szymanski &lt;sebastien.szymanski@armadeus.com&gt;
</content>
</entry>
<entry>
<title>Remove &lt;inttypes.h&gt; includes and PRI* usages in printf() entirely</title>
<updated>2018-09-11T00:48:17Z</updated>
<author>
<name>Masahiro Yamada</name>
</author>
<published>2018-08-06T11:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=dee37fc99d945eb96f0f501d17833cbb05798ad3'/>
<id>urn:sha1:dee37fc99d945eb96f0f501d17833cbb05798ad3</id>
<content type='text'>
In int-ll64.h, we always use the following typedefs:

  typedef unsigned int         u32;
  typedef unsigned long        uintptr_t;
  typedef unsigned long long   u64;

This does not need to match to the compiler's &lt;inttypes.h&gt;.
Do not include it.

The use of PRI* makes the code super-ugly.  You can simply use
"l" for printing uintptr_t, "ll" for u64, and no modifier for u32.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: fix crash on ext4ls</title>
<updated>2018-05-23T21:30:04Z</updated>
<author>
<name>Eugen Hristev</name>
</author>
<published>2018-05-09T13:28:37Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=e71a969cea56eb3e93de3320df5ce44c9e4e1c53'/>
<id>urn:sha1:e71a969cea56eb3e93de3320df5ce44c9e4e1c53</id>
<content type='text'>
Found a crash while issuing ext4ls with a non-existent directory.
Crash test:

=&gt; ext4ls mmc 0 1
** Can not find directory. **
data abort
pc : [&lt;3fd7c2ec&gt;]          lr : [&lt;3fd93ed8&gt;]
reloc pc : [&lt;26f142ec&gt;]    lr : [&lt;26f2bed8&gt;]
sp : 3f963338  ip : 3fdc3dc4     fp : 3fd6b370
r10: 00000004  r9 : 3f967ec0     r8 : 3f96db68
r7 : 3fdc99b4  r6 : 00000000     r5 : 3f96dc88  r4 : 3fdcbc8c
r3 : fffffffa  r2 : 00000000     r1 : 3f96e0bc  r0 : 00000002
Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

Tested on SAMA5D2_Xplained board (sama5d2_xplained_mmc_defconfig)

Looks like crash is introduced by commit:
"fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls

Issue is that dirnode is not initialized, and then freed if the call
to ext4_ls fails. ext4_ls will not change the value of dirnode in this case
thus we have a crash with data abort.

I added initialization and a check for dirname being NULL.

Fixes: "fa9ca8a" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
Cc: Stefan Brüns &lt;stefan.bruens@rwth-aachen.de&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Signed-off-by: Eugen Hristev &lt;eugen.hristev@microchip.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>SPDX: Convert all of our single license tags to Linux Kernel style</title>
<updated>2018-05-07T13:34:12Z</updated>
<author>
<name>Tom Rini</name>
</author>
<published>2018-05-06T21:58:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=83d290c56fab2d38cd1ab4c4cc7099559c1d5046'/>
<id>urn:sha1:83d290c56fab2d38cd1ab4c4cc7099559c1d5046</id>
<content type='text'>
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>fs: ext4: Do not print mount fail message when not ext4 filesystem</title>
<updated>2018-03-09T17:31:07Z</updated>
<author>
<name>Marek Behún</name>
</author>
<published>2018-03-07T23:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/bcm63xx/u-boot/commit/?id=51be47166319dfbf68828182cb57889bae4dc20b'/>
<id>urn:sha1:51be47166319dfbf68828182cb57889bae4dc20b</id>
<content type='text'>
Other filesystem drivers don't do this.

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;
</content>
</entry>
</feed>
