linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ext4: commit inline data during fast commit
@ 2021-10-15 18:25 Harshad Shirwadkar
  2021-10-15 18:25 ` [PATCH 2/2] ext4: inline data inode fast commit replay fixes Harshad Shirwadkar
  2021-11-04 14:44 ` [PATCH 1/2] ext4: commit inline data during fast commit Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: Harshad Shirwadkar @ 2021-10-15 18:25 UTC (permalink / raw)
  To: linux-ext4; +Cc: Harshad Shirwadkar

From: Harshad Shirwadkar <harshadshirwadkar@gmail.com>

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 <harshadshirwadkar@gmail.com>
---
 fs/ext4/fast_commit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
-- 
2.33.0.882.g93a45727a2-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-04 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-15 18:25 [PATCH 1/2] ext4: commit inline data during fast commit Harshad Shirwadkar
2021-10-15 18:25 ` [PATCH 2/2] ext4: inline data inode fast commit replay fixes Harshad Shirwadkar
2021-11-04 14:44 ` [PATCH 1/2] ext4: commit inline data during fast commit Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).