u-boot/fs
Qu Wenruo dae9aeda45 fs: btrfs: fix the false alert of decompression failure
There are some cases where decompressed sectors can have padding zeros.

In kernel code, we have lines to address such situation:

        /*
         * btrfs_getblock is doing a zero on the tail of the page too,
         * but this will cover anything missing from the decompressed
         * data.
         */
        if (bytes < destlen)
                memset(kaddr+bytes, 0, destlen-bytes);
        kunmap_local(kaddr);

But not in U-boot code, thus we have some reports of U-boot failed to
read compressed files in btrfs.

Fix it by doing the same thing of the kernel, for both inline and
regular compressed extents.

Reported-by: Matwey Kornilov <matwey.kornilov@gmail.com>
Link: https://bugzilla.suse.com/show_bug.cgi?id=1183717
Fixes: a26a6bedaf ("fs: btrfs: Introduce btrfs_read_extent_inline() and btrfs_read_extent_reg()")
Signed-off-by: Qu Wenruo <wqu@suse.com>
2021-04-27 08:05:30 -04:00
..
btrfs fs: btrfs: fix the false alert of decompression failure 2021-04-27 08:05:30 -04:00
cbfs cbfs: Drop unnecessary cast in file_cbfs_fill_cache() 2021-03-27 13:59:37 +13:00
cramfs common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
ext4 common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fat fs: fat: fix file_fat_detectfs() 2021-04-10 12:00:24 +02:00
jffs2 JFFS2: fix jffs2 summary datacrc status uninitialized 2021-04-07 10:22:22 -04:00
reiserfs common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
sandbox common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
squashfs fs/squashfs: Fix compilation error 2021-03-04 14:40:52 -05:00
ubifs common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
yaffs2 common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
zfs common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
fs.c cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions 2021-04-22 14:09:45 -04:00
fs_internal.c fs: convert error and debug messages to log 2020-09-06 21:21:41 +02:00
Kconfig fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00
Makefile fs/squashfs: new filesystem 2020-08-07 22:31:32 -04:00