History log of /openbmc/u-boot/fs/ext4/ext4_common.c (Results 1 – 25 of 79)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v00.04.15, v00.04.14, v00.04.13, v00.04.12, v00.04.11, v00.04.10, v00.04.09, v00.04.08, v00.04.07, v00.04.06, v00.04.05, v00.04.04, v00.04.03, v00.04.02, v00.04.01, v00.04.00, v2021.04, v00.03.03, v2021.01, v2020.10, v2020.07, v00.02.13, v2020.04, v2020.01, v2019.10, v00.02.05, v00.02.04, v00.02.03, v00.02.02, v00.02.01, v2019.07, v00.02.00, v2019.04
# dee37fc9 06-Aug-2018 Masahiro Yamada <yamada.masahiro@socionext.com>

Remove <inttypes.h> includes and PRI* usages in printf() entirely

In int-ll64.h, we always use the following typedefs:

typedef unsigned int u32;
typedef unsigned long uintptr_t;

Remove <inttypes.h> includes and PRI* usages in printf() entirely

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 <inttypes.h>.
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 <yamada.masahiro@socionext.com>

show more ...


Revision tags: v2018.07
# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

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

SPDX: Convert all of our single license tags to Linux Kernel style

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 <trini@konsulko.com>

show more ...


Revision tags: v2018.03
# 51be4716 07-Mar-2018 Marek Behún <marek.behun@nic.cz>

fs: ext4: Do not print mount fail message when not ext4 filesystem

Other filesystem drivers don't do this.

Signed-off-by: Marek Behun <marek.behun@nic.cz>


Revision tags: v2018.01
# 6e6cf015 27-Nov-2017 Tom Rini <trini@konsulko.com>

Merge git://www.denx.de/git/u-boot-imx

Signed-off-by: Tom Rini <trini@konsulko.com>


Revision tags: v2017.11
# ecdfb419 08-Nov-2017 Ian Ray <ian.ray@ge.com>

ext4: recover from filesystem corruption when reading

Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

- Stop reading direc

ext4: recover from filesystem corruption when reading

Some fixes when reading EXT files and directory entries were identified
after using e2fuzz to corrupt an EXT3 filesystem:

- Stop reading directory entries if the offset becomes badly aligned.

- Avoid overwriting memory by clamping the length used to zero the buffer
in ext4fs_read_file. Also sanity check blocksize.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Reviewed-by: Stefano Babic <sbabic@denx.de>

show more ...


# 385b7318 25-Sep-2017 Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

fs/ext4: Fix group descriptor checksum calculation

The current code doesn't compute the group descriptor checksum correctly
for the filesystems that e2fsprogs 1.43.4 creates (they have
'Group descri

fs/ext4: Fix group descriptor checksum calculation

The current code doesn't compute the group descriptor checksum correctly
for the filesystems that e2fsprogs 1.43.4 creates (they have
'Group descriptor size: 64' as reported by tune2fs). Extend the checksum
calculation to be done as ext4_group_desc_csum() does in Linux.

This fixes these errors in dmesg from running fs-test.sh and makes it
succeed again:

[1671902.620699] EXT4-fs (loop1): ext4_check_descriptors: Checksum for group 0 failed (35782!=10965)
[1671902.620706] EXT4-fs (loop1): group descriptors corrupted!

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>

show more ...


# 3cc5bbb8 26-Dec-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

fs/ext4: Initialize group descriptor size for revision level 0 filesystems

genext2fs creates revision level 0 filesystems, which are not readable
by u-boot due to the initialized group descriptor si

fs/ext4: Initialize group descriptor size for revision level 0 filesystems

genext2fs creates revision level 0 filesystems, which are not readable
by u-boot due to the initialized group descriptor size field.
f798b1dda1c5de818b806189e523d1b75db7e72d

Reported-by: Kever Yang <kever.yang@rock-chips.com>
Reported-by: FrostyBytes@protonmail.com
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Tested-by: Kever Yang <kever.yang@rock-chips.com>

show more ...


# 2d221489 29-Nov-2016 Stefano Babic <sbabic@denx.de>

Merge branch 'master' of git://git.denx.de/u-boot

Signed-off-by: Stefano Babic <sbabic@denx.de>


# f81db56f 05-Nov-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Fix handling of sparse files

A sparse file may have regions not mapped by any extents, at the start
or at the end of the file, or anywhere between, thus not finding a
matching extent region is

ext4: Fix handling of sparse files

A sparse file may have regions not mapped by any extents, at the start
or at the end of the file, or anywhere between, thus not finding a
matching extent region is never an error.

Found by python filesystem tests.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# 805e3e00 09-Oct-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Only write journal entries for modified blocks in unlink_filename

Instead of creating a journal entry for each directory block, even
if the block is unmodified, only log the modified block.

S

ext4: Only write journal entries for modified blocks in unlink_filename

Instead of creating a journal entry for each directory block, even
if the block is unmodified, only log the modified block.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# d1bdf224 09-Oct-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Fix handling of direntlen in unlink_filename

The direntlen checks were quite bogus, i.e. the loop termination used
"len + offset == blocksize" (exact match only), and checked for a
direntlen l

ext4: Fix handling of direntlen in unlink_filename

The direntlen checks were quite bogus, i.e. the loop termination used
"len + offset == blocksize" (exact match only), and checked for a
direntlen less than 0. The latter can never happen as the len is
unsigned, this has been reported by Coverity, CID 153384.

Use the same code as in search_dir for directory traversal. This code
has the correct checks for direntlen >= sizeof(struct dirent), and
offset < blocksize.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reported-by: Coverity (CID: 153383, 153384)
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# 15bf8c4f 09-Oct-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: cleanup unlink_filename function

Use the same variable names as in search_dir, to make purpose of variables
more obvious.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-b

ext4: cleanup unlink_filename function

Use the same variable names as in search_dir, to make purpose of variables
more obvious.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Tom Rini <trini@konsulko.com>

show more ...


# b4976b49 16-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Revert rejection of 64bit enabled ext4 fs

Enable mounting of ext4 fs with 64bit feature, as it is supported now.
These had been disabled in 6f94ab6656ceffb3f2a972c8de4c554502b6f2b7.

Signed-of

ext4: Revert rejection of 64bit enabled ext4 fs

Enable mounting of ext4 fs with 64bit feature, as it is supported now.
These had been disabled in 6f94ab6656ceffb3f2a972c8de4c554502b6f2b7.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# 749e93ee 19-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Respect group descriptor size when adjusting free counts

Also adjust high 16/32 bits when free inode/block counts are modified.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>


# 688d0e79 16-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Use helper function to access group descriptor and its fields

The descriptor size is variable, thus array indices are not generically
applicable. The larger group descriptors also contain e.g.

ext4: Use helper function to access group descriptor and its fields

The descriptor size is variable, thus array indices are not generically
applicable. The larger group descriptors also contain e.g. high parts
of block numbers, which have to be read and written.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# f798b1dd 16-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Use correct descriptor size when reading the block group descriptor

The correct descriptor size must be used when calculating offsets, and
also to read the correct amount of data.

Signed-off-

ext4: Use correct descriptor size when reading the block group descriptor

The correct descriptor size must be used when calculating offsets, and
also to read the correct amount of data.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# 9f5dd8b6 19-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Add helper functions for block group descriptor field access

The helper functions encapsulate access of the block group descriptors,
independent of group descriptor size. The helpers also deal

ext4: Add helper functions for block group descriptor field access

The helper functions encapsulate access of the block group descriptors,
independent of group descriptor size. The helpers also deal with the
endianess of the fields, and with split fields like free_blocks/
free_blocks_high.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# fc214ef9 16-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: determine group descriptor size for 64bit feature

If EXT4_FEATURE_INCOMPAT_64BIT is set, the descriptor can be read from
the superblocks, otherwise it defaults to 32.

Signed-off-by: Stefan Br

ext4: determine group descriptor size for 64bit feature

If EXT4_FEATURE_INCOMPAT_64BIT is set, the descriptor can be read from
the superblocks, otherwise it defaults to 32.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# de9e8316 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Correct block number handling, empty block vs. error code

read_allocated block may return block number 0, which is just an indicator
a chunk of the file is not backed by a block, i.e. it is sp

ext4: Correct block number handling, empty block vs. error code

read_allocated block may return block number 0, which is just an indicator
a chunk of the file is not backed by a block, i.e. it is sparse.

During file deletions, just continue with the next logical block, for other
operations treat blocknumber <= 0 as an error.

For writes, blocknumber 0 should never happen, as U-Boot always allocates
blocks for the whole file. Reading already handles this correctly, i.e. the
read buffer is 0-fillled.

Not treating block 0 as sparse block leads to FS corruption, e.g.
./sandbox/u-boot -c 'host bind 0 ./sandbox/test/fs/3GB.ext4.img ;
ext4write host 0 0 /2.5GB.file 1 '
The 2.5GB.file from the fs test is actually a sparse file.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>

show more ...


# 0ceef3d3 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Avoid out-of-bounds access of block bitmap

If the blocksize is 1024, count is initialized with 1. Incrementing count
by 8 will never match (count == fs->blksz * 8), and ptr may be
incremented

ext4: Avoid out-of-bounds access of block bitmap

If the blocksize is 1024, count is initialized with 1. Incrementing count
by 8 will never match (count == fs->blksz * 8), and ptr may be
incremented beyond the buffer end if the bitmap is filled. Add the
startblock offset after the loop.

Remove the second loop, as only the first iteration will be done.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# a9fa0ed1 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: After completely filled group, scan next group from the beginning

The last free block of a block group may be in its middle. After it has
been allocated, the next block group should be scanned

ext4: After completely filled group, scan next group from the beginning

The last free block of a block group may be in its middle. After it has
been allocated, the next block group should be scanned from its beginning.

The following command triggers the bad behaviour (on a blocksize 1024 fs):

./sandbox/u-boot -c 'i=0; host bind 0 ./disk.raw ;
while test $i -lt 260 ; do echo $i; setexpr i $i + 1;
ext4write host 0:2 0 /X${i} 0x1450; done ;
ext4write host 0:2 0 /X240 0x2000 ; '

When 'X240' is extended from 5200 byte to 8192 byte, the new blocks should
start from the first free block (8811), but it uses the blocks 8098-8103
and 16296-16297 -- 8103 + 1 + 8192 = 16296. This can be shown with
debugfs, commands 'ffb' and 'stat X240'.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# e9272652 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Do not clear zalloc'ed buffers a second time

zero_buffer is never written, thus clearing it is pointless.
journal_buffer is completely initialized by ext4fs_devread (or in case
of failure, not

ext4: Do not clear zalloc'ed buffers a second time

zero_buffer is never written, thus clearing it is pointless.
journal_buffer is completely initialized by ext4fs_devread (or in case
of failure, not used).

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# 398d6fad 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Only update number of of unused inodes if GDT_CSUM feature is set

e2fsck warns about "Group descriptor 0 marked uninitialized without
feature set."
The bg_itable_unused field is only defined i

ext4: Only update number of of unused inodes if GDT_CSUM feature is set

e2fsck warns about "Group descriptor 0 marked uninitialized without
feature set."
The bg_itable_unused field is only defined if FEATURE_RO_COMPAT_GDT_CSUM
is set, and should be set (kept) zero otherwise.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# b7dd40d0 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Scan all directory blocks when looking up an entry

Scanning only the direct blocks of the directory file may falsely report
an existing file as nonexisting, and worse can also lead to creation

ext4: Scan all directory blocks when looking up an entry

Scanning only the direct blocks of the directory file may falsely report
an existing file as nonexisting, and worse can also lead to creation
of a duplicate entry on file creation.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


# a321abd5 05-Sep-2016 Stefan Brüns <stefan.bruens@rwth-aachen.de>

ext4: Scan all directory blocks for space when inserting a new entry

Previously, only the last directory block was scanned for available space.
Instead, scan all blocks back to front, and if no suff

ext4: Scan all directory blocks for space when inserting a new entry

Previously, only the last directory block was scanned for available space.
Instead, scan all blocks back to front, and if no sufficient space is
found, eventually append a new block.
Blocks are only appended if the directory does not use extents or the new
block would require insertion of indirect blocks, as the old code does.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>

show more ...


1234