Skip to content

Commit 7882b01

Browse files
Luis Henriques (SUSE)tytso
authored andcommitted
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) <[email protected]> Tested-by: Ben Hutchings <[email protected]> Fixes: 9725958 ("ext4: fast commit may miss tracking unwritten range during ftruncate") Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 6346966 commit 7882b01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/ext4/fast_commit.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,12 @@ void ext4_fc_track_range(handle_t *handle, struct inode *inode, ext4_lblk_t star
649649
if (ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE))
650650
return;
651651

652+
if (ext4_has_inline_data(inode)) {
653+
ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_XATTR,
654+
handle);
655+
return;
656+
}
657+
652658
args.start = start;
653659
args.end = end;
654660

0 commit comments

Comments
 (0)