mbox series

[v3,0/2] btrfs: enhance function extent_range_clear_dirty_for_io()

Message ID cover.1716427131.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs: enhance function extent_range_clear_dirty_for_io() | expand

Message

Qu Wenruo May 23, 2024, 1:19 a.m. UTC
[Changelog]
v3:
- Drop the patch to use subpage helper
  For subpage cases, fsstress with compression can lead to hang where
  OE seems hanging and never to be finished.
  So far it looks like some race with i_size change but still not sure
  why the code change is involved.
  Drop the subpage helper change for now.

v2:
- Split the original patch into 3

- Return the error from filemap_get_folio() to be future-proof

- Enhance the comments for the new ASSERT() on
  extent_range_clear_dirty_for_io() error
  In fact, even if some pages are missing, we do not need to handle the
  error at compress_file_range(), as btrfs_compress_folios() and each
  compression routine would handle the missing folio correctly.

  Thus the new ASSERT() is only an early warning for developers.

Qu Wenruo (2):
  btrfs: move extent_range_clear_dirty_for_io() into inode.c
  btrfs: remove the BUG_ON() inside extent_range_clear_dirty_for_io()

 fs/btrfs/extent_io.c | 15 ---------------
 fs/btrfs/extent_io.h |  1 -
 fs/btrfs/inode.c     | 31 ++++++++++++++++++++++++++++++-
 3 files changed, 30 insertions(+), 17 deletions(-)

Comments

David Sterba July 2, 2024, 4:43 p.m. UTC | #1
On Thu, May 23, 2024 at 10:49:36AM +0930, Qu Wenruo wrote:
> [Changelog]
> v3:
> - Drop the patch to use subpage helper
>   For subpage cases, fsstress with compression can lead to hang where
>   OE seems hanging and never to be finished.
>   So far it looks like some race with i_size change but still not sure
>   why the code change is involved.
>   Drop the subpage helper change for now.
> 
> v2:
> - Split the original patch into 3
> 
> - Return the error from filemap_get_folio() to be future-proof
> 
> - Enhance the comments for the new ASSERT() on
>   extent_range_clear_dirty_for_io() error
>   In fact, even if some pages are missing, we do not need to handle the
>   error at compress_file_range(), as btrfs_compress_folios() and each
>   compression routine would handle the missing folio correctly.
> 
>   Thus the new ASSERT() is only an early warning for developers.
> 
> Qu Wenruo (2):
>   btrfs: move extent_range_clear_dirty_for_io() into inode.c
>   btrfs: remove the BUG_ON() inside extent_range_clear_dirty_for_io()

Reviewed-by: David Sterba <dsterba@suse.com>