Patch "ext4: don't track ranges in fast_commit if inode has inlined data" has been added to the 5.15-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

    ext4: don't track ranges in fast_commit if inode has inlined data

to the 5.15-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:
     ext4-don-t-track-ranges-in-fast_commit-if-inode-has-.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 08b28c201ac821989b833f152108b7b4d5ed4e0b
Author: Luis Henriques (SUSE) <luis.henriques@xxxxxxxxx>
Date:   Tue Jun 18 15:43:12 2024 +0100

    ext4: don't track ranges in fast_commit if inode has inlined data
    
    [ Upstream commit 7882b0187bbeb647967a7b5998ce4ad26ef68a9a ]
    
    When fast-commit needs to track ranges, it has to handle inodes that have
    inlined data in a different way because ext4_fc_write_inode_data(), in the
    actual commit path, will attempt to map the required blocks for the range.
    However, inodes that have inlined data will have it's data stored in
    inode->i_block and, eventually, in the extended attribute space.
    
    Unfortunately, because fast commit doesn't currently support extended
    attributes, the solution is to mark this commit as ineligible.
    
    Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039883
    Signed-off-by: Luis Henriques (SUSE) <luis.henriques@xxxxxxxxx>
    Tested-by: Ben Hutchings <benh@xxxxxxxxxx>
    Fixes: 9725958bb75c ("ext4: fast commit may miss tracking unwritten range during ftruncate")
    Link: https://patch.msgid.link/20240618144312.17786-1-luis.henriques@xxxxxxxxx
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index c6814edf0ce0a..e81b886d9c673 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -617,6 +617,12 @@ void ext4_fc_track_range(handle_t *handle, struct inode *inode, ext4_lblk_t star
 	if (ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE))
 		return;
 
+	if (ext4_has_inline_data(inode)) {
+		ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_XATTR,
+					handle);
+		return;
+	}
+
 	args.start = start;
 	args.end = end;
 




[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