ext4: don't track ranges in fast_commit if inode has inlined data
authorLuis Henriques (SUSE) <luis.henriques@linux.dev>
Tue, 18 Jun 2024 14:43:12 +0000 (15:43 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Jul 2024 03:59:37 +0000 (23:59 -0400)
commit7882b0187bbeb647967a7b5998ce4ad26ef68a9a
tree7a7c66705381e9077e1e22c5129741fb8d569cc3
parent63469662cc45d41705f14b4648481d5d29cf5999
ext4: don't track ranges in fast_commit if inode has inlined data

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>
fs/ext4/fast_commit.c