]> git.baikalelectronics.ru Git - uboot.git/commit
ext4: fix calculating inode blkcount for non-512 blocksize filesystems
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 21 Jun 2019 13:32:51 +0000 (15:32 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 18 Jul 2019 15:31:24 +0000 (11:31 -0400)
commitb7041f6b1cf39fdf229d41ae793e356617847c3f
tree3129fc1583e8d7b9a08c43ef1b72c86448517848
parent6ecf8a4b66dce45661a20187fccaee1aaf474c65
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>
fs/ext4/ext4_common.c
fs/ext4/ext4_write.c
include/ext_common.h