diff options
author | Luis Henriques (SUSE) <luis.henriques@linux.dev> | 2024-06-18 15:43:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-03 08:49:16 +0200 |
commit | a1832c0fcb01f9d7fb196a07b9a2e59dae46e35e (patch) | |
tree | 5b27cd3291ad32314b9739de38d19a76ced74c01 /fs/ext4/fast_commit.c | |
parent | b3ee82c8690f273633066da2464763c1becd301f (diff) | |
download | linux-a1832c0fcb01f9d7fb196a07b9a2e59dae46e35e.tar.gz linux-a1832c0fcb01f9d7fb196a07b9a2e59dae46e35e.tar.bz2 linux-a1832c0fcb01f9d7fb196a07b9a2e59dae46e35e.zip |
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@linux.dev>
Tested-by: Ben Hutchings <benh@debian.org>
Fixes: 9725958bb75c ("ext4: fast commit may miss tracking unwritten range during ftruncate")
Link: https://patch.msgid.link/20240618144312.17786-1-luis.henriques@linux.dev
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/ext4/fast_commit.c')
-rw-r--r-- | fs/ext4/fast_commit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 1110bfa0a5b7..19353a2f44bb 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -649,6 +649,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; |