diff options
author | Qu Wenruo <wqu@suse.com> | 2024-09-11 01:22:36 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:12 +0100 |
commit | 928b4de66ed3b0d9a6f201ce41ab2eed6ea2e7ef (patch) | |
tree | bbe9ad6793e7cdef87acc9e6dfc88cda6b5194b7 | |
parent | btrfs: make extent_range_clear_dirty_for_io() to handle sector size < page si... (diff) | |
download | linux-928b4de66ed3b0d9a6f201ce41ab2eed6ea2e7ef.tar.xz linux-928b4de66ed3b0d9a6f201ce41ab2eed6ea2e7ef.zip |
btrfs: do not assume the full page range is not dirty in extent_writepage_io()
The function extent_writepage_io() will submit the dirty sectors inside
the page for the write.
But recently to co-operate with the incoming subpage compression
enhancement, a new bitmap is introduced to
btrfs_bio_ctrl::submit_bitmap, to only avoid a subset of the dirty
range.
This is because we can have the following cases with 64K page size:
0 16K 32K 48K 64K
| |/////////| |/|
52K
For range [16K, 32K), we queue the dirty range for compression, which is
ran in a delayed workqueue.
Then for range [48K, 52K), we go through the regular submission path.
In that case, our btrfs_bio_ctrl::submit_bitmap will exclude the range
[16K, 32K).
The dirty flags for the range [16K, 32K) is only cleared when the
compression is done, by the extent_clear_unlock_delalloc() call inside
submit_one_async_extent().
This patch fix the false alert by removing the
btrfs_folio_assert_not_dirty() check, since it's no longer correct for
subpage compression cases.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/extent_io.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 7620d335f1ec..e5075b95cfd9 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1391,8 +1391,6 @@ static noinline_for_stack int extent_writepage_io(struct btrfs_inode *inode, goto out; submitted_io = true; } - - btrfs_folio_assert_not_dirty(fs_info, folio, start, len); out: /* * If we didn't submitted any sector (>= i_size), folio dirty get |