diff options
| author | Harshad Shirwadkar <[email protected]> | 2021-10-15 18:25:12 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2021-11-04 14:34:39 +0000 |
| commit | 6c31a689b2e9e1dee5cbe16b773648a2d84dfb02 (patch) | |
| tree | 9ba0777fe31897e4cc7b8fc15066e62b4605b098 /fs/ext4/fast_commit.c | |
| parent | ext4: scope ret locally in ext4_try_to_trim_range() (diff) | |
| download | kernel-6c31a689b2e9e1dee5cbe16b773648a2d84dfb02.tar.gz kernel-6c31a689b2e9e1dee5cbe16b773648a2d84dfb02.zip | |
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]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
| -rw-r--r-- | fs/ext4/fast_commit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 8ea5a81e6554..744b000d9756 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -819,7 +819,9 @@ static int ext4_fc_write_inode(struct inode *inode, u32 *crc) if (ret) return ret; - if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) + if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA)) + inode_len = EXT4_INODE_SIZE(inode->i_sb); + else if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) inode_len += ei->i_extra_isize; fc_inode.fc_ino = cpu_to_le32(inode->i_ino); |
