linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH U-BOOT v2 0/3] fs: btrfs: Fix false LZO decompression error due to missing page boundary check
@ 2020-03-26  5:35 Qu Wenruo
  2020-03-26  5:35 ` [PATCH U-BOOT v2 1/3] fs: btrfs: Use LZO_LEN to replace immediate number Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Qu Wenruo @ 2020-03-26  5:35 UTC (permalink / raw)
  To: u-boot; +Cc: linux-btrfs

There is a bug that uboot can't load LZO compressed data extent while
kernel can handle it without any problem.

It turns out to be a page boundary case. The 3nd patch is the proper
fix, cross-ported from btrfs-progs.

The first patch is just to make my eyes less hurt.
The second patch is to make sure the driver will reject sector size not
matching PAGE_SIZE.
This keeps the behavior the same as kernel, even in theory we could do
better in U-boot. This is just a temporary fix, before better btrfs
driver implemented.

I guess it's time to backport proper code from btrfs-progs, other than
using tons of immediate codes.

Changelog:
v2:
- Fix code style problems
- Add a new patch to reject non-page-sized sector size
  Since kernel does the same thing, and non-4K page size u-boot boards
  are really rare, it shouldn't be a big problem.

Qu Wenruo (3):
  fs: btrfs: Use LZO_LEN to replace immediate number
  fs: btrfs: Reject fs with sector size other than PAGE_SIZE
  fs: btrfs: Fix LZO false decompression error caused by pending zero

 fs/btrfs/compression.c | 42 +++++++++++++++++++++++++++++++-----------
 fs/btrfs/super.c       |  8 ++++++++
 2 files changed, 39 insertions(+), 11 deletions(-)

-- 
2.26.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-04-17 21:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-26  5:35 [PATCH U-BOOT v2 0/3] fs: btrfs: Fix false LZO decompression error due to missing page boundary check Qu Wenruo
2020-03-26  5:35 ` [PATCH U-BOOT v2 1/3] fs: btrfs: Use LZO_LEN to replace immediate number Qu Wenruo
2020-03-26  9:02   ` Marek Behun
2020-04-17 21:08   ` Tom Rini
2020-03-26  5:35 ` [PATCH U-BOOT v2 2/3] fs: btrfs: Reject fs with sector size other than PAGE_SIZE Qu Wenruo
2020-03-26  9:03   ` Marek Behun
2020-04-17 21:09   ` Tom Rini
2020-03-26  5:35 ` [PATCH U-BOOT v2 3/3] fs: btrfs: Fix LZO false decompression error caused by pending zero Qu Wenruo
2020-03-26  9:03   ` Marek Behun
2020-04-17 21:09   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).