Skip to content

Commit 6c31a68

Browse files
harshadjstytso
authored andcommitted
ext4: commit inline data during fast commit
During the commit phase in fast commits if an inode with inline data is being committed, also commit the inline data along with inode. Since recovery code just blindly copies entire content found in inode TLV, there is no change needed on the recovery path. Thus, this change is backward compatiable. Signed-off-by: Harshad Shirwadkar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent afcc4e3 commit 6c31a68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/ext4/fast_commit.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,9 @@ static int ext4_fc_write_inode(struct inode *inode, u32 *crc)
819819
if (ret)
820820
return ret;
821821

822-
if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE)
822+
if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA))
823+
inode_len = EXT4_INODE_SIZE(inode->i_sb);
824+
else if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE)
823825
inode_len += ei->i_extra_isize;
824826

825827
fc_inode.fc_ino = cpu_to_le32(inode->i_ino);

0 commit comments

Comments
 (0)