mbox series

[0/3] btrfs: fsstress hang fix for large data folios

Message ID cover.1743731232.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs: fsstress hang fix for large data folios | expand

Message

Qu Wenruo April 4, 2025, 1:47 a.m. UTC
With my local large data folios enabled btrfs, fsstress can hit a hang
where lock_delalloc_folios() fails to lock a folio.

It turns our that filemap_get_folios_contig() can return duplicated
folios, which is fatal for lock_delalloc_folios() and
unlock_delalloc_folio().

The series here is to address the annonying filemap_get_folios_contig()
behavior for large folios.

The first patch is a small cleanup to remove unnecessary early exits,
exposed during the next folio_contains() change.

The second patch uses folio_contains() to handle EOF detection for large
folios.

The final one is the fix of filemap_get_folios_contig(), by getting rid
of it.


Qu Wenruo (3):
  btrfs: remove unnecessary early exits in delalloc folio lock and
    unlock
  btrfs: use folio_contains() for EOF detection
  btrfs: get rid of filemap_get_folios_contig() calls

 fs/btrfs/compression.c           |  2 +-
 fs/btrfs/extent_io.c             | 20 +++++---------------
 fs/btrfs/tests/extent-io-tests.c |  3 +--
 3 files changed, 7 insertions(+), 18 deletions(-)