diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2019-06-21 15:32:51 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-07-18 11:31:24 -0400 |
commit | 1c9f8f6412de4447c4f6fadeac1919c89de005f7 (patch) | |
tree | 3129fc1583e8d7b9a08c43ef1b72c86448517848 /include | |
parent | 55f2bc7dd655b6c26cd5fd211a086406416510a6 (diff) | |
download | u-boot-1c9f8f6412de4447c4f6fadeac1919c89de005f7.tar.gz |
ext4: fix calculating inode blkcount for non-512 blocksize filesystems
The block count entry in the EXT4 filesystem disk structures uses
standard 512-bytes units for most of the typical files. The only
exception are HUGE files, which use the filesystem block size, but those
are not supported by uboot's EXT4 implementation anyway. This patch fixes
the EXT4 code to use proper unit count for inode block count. This fixes
errors reported by fsck.ext4 on disks with non-standard (i.e. 4KiB, in
case of new flash drives) PHYSICAL block size after using 'ext4write'
uboot's command.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/ext_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ext_common.h b/include/ext_common.h index 17c92f1750..1c10c50474 100644 --- a/include/ext_common.h +++ b/include/ext_common.h @@ -21,6 +21,7 @@ #define __EXT_COMMON__ #include <command.h> #define SECTOR_SIZE 0x200 +#define LOG2_SECTOR_SIZE 9 /* Magic value used to identify an ext2 filesystem. */ #define EXT2_MAGIC 0xEF53 |