linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: fixes for incoming sector perfect compression support
@ 2024-09-06  5:16 Qu Wenruo
  2024-09-06  5:16 ` [PATCH 1/3] btrfs: zlib: make the compression path to handle sector size < page size Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2024-09-06  5:16 UTC (permalink / raw)
  To: linux-btrfs

Currently if a btrfs is mount with sector size < page size (aka,
subpage), then compression is only limited to range that is fully page
aligned.

This is mostly caused by the asynchonously submission for compression.

With recent changes in the page writeback path, we're closer and closer
to the sector perfect compression support for subpage.

Locally I have already enabled such support to shake out the remaining
bugs.

So far 2 obvious bugs are exposed by my local fstests runs.
They all share the same cause, incorrect assumption that one page is one
sector, thus some pointer is always increased by PAGE_SIZE, which is not
correct.

Fix both of them with a single line fix, then add an ASSERT() to ensure
the total read-in bytes never exceed the input range.

There is a remaining hang reproduced by btrfs/062, which I'm still
debugging, but I think sector perfect compression support is not that far
away anymore.

Qu Wenruo (3):
  btrfs: zlib: make the compression path to handle sector size < page
    size
  btrfs: zstd: make the compression path to handle sector size < page
    size
  btrfs: compression: add an ASSERT() to ensure the read-in length is
    sane

 fs/btrfs/compression.c | 3 +++
 fs/btrfs/zlib.c        | 2 +-
 fs/btrfs/zstd.c        | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.46.0


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

end of thread, other threads:[~2024-09-06  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06  5:16 [PATCH 0/3] btrfs: fixes for incoming sector perfect compression support Qu Wenruo
2024-09-06  5:16 ` [PATCH 1/3] btrfs: zlib: make the compression path to handle sector size < page size Qu Wenruo
2024-09-06  5:16 ` [PATCH 2/3] btrfs: zstd: " Qu Wenruo
2024-09-06  5:16 ` [PATCH 3/3] btrfs: compression: add an ASSERT() to ensure the read-in length is sane Qu Wenruo

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).