summaryrefslogtreecommitdiff
path: root/drivers/phy/eswin/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorLi Chen <me@linux.beauty>2026-05-15 17:18:21 +0800
committerTheodore Ts'o <tytso@mit.edu>2026-06-03 10:26:35 -0400
commite9c6e0b8e096255feb71ec996c77bdfbe9c36e91 (patch)
tree7485d38c66ccf02aebb9a8f978fdb432bfdb84f4 /drivers/phy/eswin/git@git.tavy.me:linux.git
parent289a2ca0c9b7eae74f93fc213b0b971669b8683d (diff)
ext4: fast commit: snapshot inode state before writing log
Fast commit writes inode metadata and data range updates after unlocking journal updates. New handles can start at that point, so the log writing path must not look at live inode state. Add a commit-time per-inode snapshot and populate it while journal updates are locked and existing handles are drained. Store the snapshot behind ext4_inode_info->i_fc_snap so ext4_inode_info only grows by one pointer. The snapshot contains a copy of the on-disk inode plus the data range records needed for fast commit TLVs. Snapshotting runs under jbd2_journal_lock_updates(). Avoid triggering I/O there by using ext4_get_inode_loc_noio() and falling back to full commit if the inode table block is not present or not uptodate. Log writing then only serializes the snapshot, so it no longer needs to call ext4_map_blocks() and take i_data_sem under s_fc_lock. The snapshot is installed and freed under s_fc_lock and is released from fast commit cleanup and inode eviction. Signed-off-by: Li Chen <chenl311@chinatelecom.cn> Link: https://patch.msgid.link/20260515091829.194810-2-me@linux.beauty Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'drivers/phy/eswin/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions