Patch "btrfs: fix warning messages not printing interval at unpin_extent_range()" has been added to the 6.8-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: fix warning messages not printing interval at unpin_extent_range()

to the 6.8-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-fix-warning-messages-not-printing-interval-at-.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 23a191226cdc689a0a040d98e1de851cb20fb24c
Author: Filipe Manana <fdmanana@xxxxxxxx>
Date:   Wed Mar 13 12:49:31 2024 +0000

    btrfs: fix warning messages not printing interval at unpin_extent_range()
    
    [ Upstream commit 4dc1d69c2b101eee0bf071187794ffed2f9c2596 ]
    
    At unpin_extent_range() we print warning messages that are supposed to
    print an interval in the form "[X, Y)", with the first element being an
    inclusive start offset and the second element being the exclusive end
    offset of a range. However we end up printing the range's length instead
    of the range's exclusive end offset, so fix that to avoid having confusing
    and non-sense messages in case we hit one of these unexpected scenarios.
    
    Fixes: 00deaf04df35 ("btrfs: log messages at unpin_extent_range() during unexpected cases")
    Reviewed-by: Qu Wenruo <wqu@xxxxxxxx>
    Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx>
    Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index f170e7122e747..c02039db5d247 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -311,7 +311,7 @@ int unpin_extent_cache(struct btrfs_inode *inode, u64 start, u64 len, u64 gen)
 		btrfs_warn(fs_info,
 "no extent map found for inode %llu (root %lld) when unpinning extent range [%llu, %llu), generation %llu",
 			   btrfs_ino(inode), btrfs_root_id(inode->root),
-			   start, len, gen);
+			   start, start + len, gen);
 		ret = -ENOENT;
 		goto out;
 	}
@@ -320,7 +320,7 @@ int unpin_extent_cache(struct btrfs_inode *inode, u64 start, u64 len, u64 gen)
 		btrfs_warn(fs_info,
 "found extent map for inode %llu (root %lld) with unexpected start offset %llu when unpinning extent range [%llu, %llu), generation %llu",
 			   btrfs_ino(inode), btrfs_root_id(inode->root),
-			   em->start, start, len, gen);
+			   em->start, start, start + len, gen);
 		ret = -EUCLEAN;
 		goto out;
 	}




[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