From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 27 Apr 2021 12:46:02 -0400 Subject: [PATCH U-boot v2] fs: btrfs: fix the false alert of decompression failure In-Reply-To: <20210417125213.132066-1-wqu@suse.com> References: <20210417125213.132066-1-wqu@suse.com> Message-ID: <20210427164602.GS17669@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Apr 17, 2021 at 08:52:13PM +0800, Qu Wenruo wrote: > 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 > Link: https://bugzilla.suse.com/show_bug.cgi?id=1183717 > Fixes: a26a6bedafcf ("fs: btrfs: Introduce btrfs_read_extent_inline() and btrfs_read_extent_reg()") > Signed-off-by: Qu Wenruo Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: