Patch "btrfs: do not assume the full page range is not dirty in extent_writepage_io()" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    btrfs: do not assume the full page range is not dirty in extent_writepage_io()

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-do-not-assume-the-full-page-range-is-not-dirty.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7a2dc671c2105c12e3a4beeefbc6ec54658a07ff
Author: Qu Wenruo <wqu@xxxxxxxx>
Date:   Wed Sep 11 08:52:36 2024 +0930

    btrfs: do not assume the full page range is not dirty in extent_writepage_io()
    
    [ Upstream commit 928b4de66ed3b0d9a6f201ce41ab2eed6ea2e7ef ]
    
    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@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Stable-dep-of: 8bf334beb349 ("btrfs: fix double accounting race when extent_writepage_io() failed")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index fe08c983d5bb4..9ff72a5a13eb3 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1394,8 +1394,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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux