ext4: mark more ops fast-commit ineligible
Subsystems (2)
cover ext4: mark more ops fast-commit ineligible
ext4 fast commit only logs operations with replay support. This series marks a few more operations as fast-commit ineligible and accounts them via fc_info so behaviour under fast commit is easier to reason about.
Testing was done in a QEMU guest on loopback ext4 filesystems created with -O fast_commit[/,verity] by exercising each operation and checking /proc/fs/ext4/*/fc_info for the corresponding ineligible reason and ineligible commit counters. Detailed steps are in each commit's message.
Li Chen (5):
ext4: mark inode format migration fast-commit ineligible
ext4: mark fs-verity enable fast-commit ineligible
ext4: mark move extents fast-commit ineligible
ext4: mark group add fast-commit ineligible
ext4: mark group extend fast-commit ineligible
fs/ext4/fast_commit.c | 3 +++ fs/ext4/fast_commit.h | 3 +++ fs/ext4/ioctl.c | 3 +++ fs/ext4/migrate.c | 12 ++++++++++++ fs/ext4/move_extent.c | 1 + fs/ext4/verity.c | 2 ++ include/trace/events/ext4.h | 8 +++++++- 7 files changed, 31 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0
RFC 1/5 ext4: mark inode format migration fast-commit ineligible
Fast commits only log operations that have dedicated replay support. Inode format migration (indirect<->extent layout changes via EXT4_IOC_MIGRATE or toggling EXT4_EXTENTS_FL) rewrites the block mapping representation without going through the fast commit tracking paths. In practice these migrations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.
Teach ext4 to mark the filesystem fast-commit ineligible when ext4_ext_migrate() or ext4_ind_migrate() start their journal transactions. This forces those transactions to fall back to a full commit, ensuring that the entire inode layout change is captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes format migrations safer and easier to reason about under fast commit.
Testing:
1. prepare:
dd if=/dev/zero of=/root/fc.img bs=1M count=0 seek=128
mkfs.ext4 -O fast_commit -F /root/fc.img
mkdir -p /mnt/fc && mount -t ext4 -o loop /root/fc.img /mnt/fc2. Created a test file and toggled the extents flag to exercise both ext4_ind_migrate() and ext4_ext_migrate():
touch /mnt/fc/migtest
chattr -e /mnt/fc/migtest
chattr +e /mnt/fc/migtest
3. Verified fast-commit ineligible statistics:
tail -n 1 /proc/fs/ext4/loop0/fc_info
"Inode format migration": 2
--- fs/ext4/fast_commit.c | 1 + fs/ext4/fast_commit.h | 1 + fs/ext4/migrate.c | 12 ++++++++++++ include/trace/events/ext4.h | 4 +++- 4 files changed, 17 insertions(+), 1 deletion(-)
fs/ext4/fast_commit.c +1 -0
@@ -2302,6 +2302,7 @@ static const char * const fc_ineligible_reasons[] = { [EXT4_FC_REASON_FALLOC_RANGE] = "Falloc range op", [EXT4_FC_REASON_INODE_JOURNAL_DATA] = "Data journalling", [EXT4_FC_REASON_ENCRYPTED_FILENAME] = "Encrypted filename", + [EXT4_FC_REASON_MIGRATE] = "Inode format migration", };int ext4_fc_info_show (struct seq_file *seq,void *v)
fs/ext4/fast_commit.h +1 -0
@@ -97,6 +97,7 @@ enum {EXT4_FC_REASON_FALLOC_RANGE ,EXT4_FC_REASON_INODE_JOURNAL_DATA ,EXT4_FC_REASON_ENCRYPTED_FILENAME , +EXT4_FC_REASON_MIGRATE , EXT4_FC_REASON_MAX };
fs/ext4/migrate.c +12 -0
@@ -449,6 +449,12 @@ int ext4_ext_migrate(struct inode *inode) retval =PTR_ERR (handle); goto out_unlock; } +/* +* This operation rewrites the inode's block mapping layout +* (indirect to extents) and is not tracked in the fast commit +* log, so disable fast commits for this transaction. +*/ +ext4_fc_mark_ineligible (inode->i_sb,EXT4_FC_REASON_MIGRATE , handle); goal = (((inode->i_ino -1 ) /EXT4_INODES_PER_GROUP (inode->i_sb)) *EXT4_INODES_PER_GROUP (inode->i_sb)) +1 ; owner[0 ] =i_uid_read (inode);
@@ -630,6 +636,12 @@ int ext4_ind_migrate(struct inode *inode) ret =PTR_ERR (handle); goto out_unlock; } +/* +* This operation rewrites the inode's block mapping layout +* (extents to indirect blocks) and is not tracked in the fast +* commit log, so disable fast commits for this transaction. +*/ +ext4_fc_mark_ineligible (inode->i_sb,EXT4_FC_REASON_MIGRATE , handle);down_write (&EXT4_I (inode)->i_data_sem); ret =ext4_ext_check_inode (inode);
include/trace/events/ext4.h +3 -1
@@ -102,6 +102,7 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_RENAME_DIR);TRACE_DEFINE_ENUM (EXT4_FC_REASON_FALLOC_RANGE );TRACE_DEFINE_ENUM (EXT4_FC_REASON_INODE_JOURNAL_DATA );TRACE_DEFINE_ENUM (EXT4_FC_REASON_ENCRYPTED_FILENAME ); +TRACE_DEFINE_ENUM (EXT4_FC_REASON_MIGRATE );TRACE_DEFINE_ENUM (EXT4_FC_REASON_MAX );#define show_fc_reason (reason) \
@@ -115,7 +116,8 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_MAX); { EXT4_FC_REASON_RENAME_DIR, "RENAME_DIR"}, \ { EXT4_FC_REASON_FALLOC_RANGE, "FALLOC_RANGE"}, \ { EXT4_FC_REASON_INODE_JOURNAL_DATA, "INODE_JOURNAL_DATA"}, \ - { EXT4_FC_REASON_ENCRYPTED_FILENAME, "ENCRYPTED_FILENAME"}) + { EXT4_FC_REASON_ENCRYPTED_FILENAME, "ENCRYPTED_FILENAME"}, \ + { EXT4_FC_REASON_MIGRATE, "MIGRATE"})TRACE_DEFINE_ENUM (CR_POWER2_ALIGNED );TRACE_DEFINE_ENUM (CR_GOAL_LEN_FAST );
Signature · 1 line
2.51.0
RFC 2/5 ext4: mark fs-verity enable fast-commit ineligible
In reply to Li ChenFast commits only log operations that have dedicated replay support. Enabling fs-verity builds a Merkle tree and updates inode and orphan state in ways that are not described by the fast commit replay tags. In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.
Teach ext4 to mark the filesystem fast-commit ineligible when ext4_end_enable_verity() starts its journal transaction. This forces that transaction to fall back to a full commit, ensuring that the fs-verity enable changes are captured by the normal journal rather than partially encoded in fast commit TLVs.
This change should not affect common workloads but makes fs-verity enable safer and easier to reason about under fast commit.
Testing:
1. prepare:
dd if=/dev/zero of=/root/fc_verity.img bs=1M count=0 seek=128
mkfs.ext4 -O fast_commit,verity -F /root/fc_verity.img
mkdir -p /mnt/fc_verity && mount -t ext4 -o loop /root/fc_verity.img /mnt/fc_verity2. Enabled fs-verity on a file and verified reason accounting:
echo "data" > /mnt/fc_verity/verityfile /root/enable_verity /mnt/fc_verity/verityfile
sync
tail -n 1 /proc/fs/ext4/loop0/fc_info
"fs-verity enable": 1
3. Enabled fs-verity on a second file, fsynced it, and checked that the ineligible commit counter is updated too:
echo "data2" > /mnt/fc_verity/verityfile2 /root/enable_verity /mnt/fc_verity/verityfile2 /root/fsync_file /mnt/fc_verity/verityfile2
sync
/proc/fs/ext4/loop0/fc_info shows "fs-verity enable" incremented and fc stats ineligible increased accordingly.
--- fs/ext4/fast_commit.c | 1 + fs/ext4/fast_commit.h | 1 + fs/ext4/verity.c | 2 ++ include/trace/events/ext4.h | 4 +++- 4 files changed, 7 insertions(+), 1 deletion(-)
fs/ext4/fast_commit.c +1 -0
@@ -2303,6 +2303,7 @@ static const char * const fc_ineligible_reasons[] = { [EXT4_FC_REASON_INODE_JOURNAL_DATA] = "Data journalling", [EXT4_FC_REASON_ENCRYPTED_FILENAME] = "Encrypted filename", [EXT4_FC_REASON_MIGRATE] = "Inode format migration", + [EXT4_FC_REASON_VERITY] = "fs-verity enable", };int ext4_fc_info_show (struct seq_file *seq,void *v)
fs/ext4/fast_commit.h +1 -0
@@ -98,6 +98,7 @@ enum {EXT4_FC_REASON_INODE_JOURNAL_DATA ,EXT4_FC_REASON_ENCRYPTED_FILENAME ,EXT4_FC_REASON_MIGRATE , +EXT4_FC_REASON_VERITY , EXT4_FC_REASON_MAX };
fs/ext4/verity.c +2 -0
@@ -231,6 +231,8 @@ static int ext4_end_enable_verity(struct file *filp, const void *desc, goto cleanup; } +ext4_fc_mark_ineligible (inode->i_sb,EXT4_FC_REASON_VERITY , handle); + err =ext4_orphan_del (handle, inode);if (err) goto stop_and_cleanup;
include/trace/events/ext4.h +3 -1
@@ -103,6 +103,7 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_FALLOC_RANGE);TRACE_DEFINE_ENUM (EXT4_FC_REASON_INODE_JOURNAL_DATA );TRACE_DEFINE_ENUM (EXT4_FC_REASON_ENCRYPTED_FILENAME );TRACE_DEFINE_ENUM (EXT4_FC_REASON_MIGRATE ); +TRACE_DEFINE_ENUM (EXT4_FC_REASON_VERITY );TRACE_DEFINE_ENUM (EXT4_FC_REASON_MAX );#define show_fc_reason (reason) \
@@ -117,7 +118,8 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_MAX); { EXT4_FC_REASON_FALLOC_RANGE, "FALLOC_RANGE"}, \ { EXT4_FC_REASON_INODE_JOURNAL_DATA, "INODE_JOURNAL_DATA"}, \ { EXT4_FC_REASON_ENCRYPTED_FILENAME, "ENCRYPTED_FILENAME"}, \ - { EXT4_FC_REASON_MIGRATE, "MIGRATE"}) + { EXT4_FC_REASON_MIGRATE, "MIGRATE"}, \ + { EXT4_FC_REASON_VERITY, "VERITY"})TRACE_DEFINE_ENUM (CR_POWER2_ALIGNED );TRACE_DEFINE_ENUM (CR_GOAL_LEN_FAST );
Signature · 1 line
2.51.0
RFC 3/5 ext4: mark move extents fast-commit ineligible
In reply to Li ChenFast commits only log operations that have dedicated replay support. EXT4_IOC_MOVE_EXT swaps extents between regular files and may copy data, rewriting the affected inodes' block mapping layout without going through the fast commit tracking paths.
In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.
Teach ext4 to mark the filesystem fast-commit ineligible for the journal transactions used by move_extent_per_page() when EXT4_IOC_MOVE_EXT runs.
This forces those transactions to fall back to a full commit, ensuring that these multi-inode extent swaps are captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes online defragmentation safer and easier to reason about under fast commit.
Testing:
1. prepare:
dd if=/dev/zero of=/root/fc_move.img bs=1M count=0 seek=256
mkfs.ext4 -O fast_commit -F /root/fc_move.img
mkdir -p /mnt/fc_move && mount -t ext4 -o loop \/root/fc_move.img /mnt/fc_move
2. Created two files, ran EXT4_IOC_MOVE_EXT via e4defrag, and checked the ineligible reason statistics:
fallocate -l 64M /mnt/fc_move/file1
cp /mnt/fc_move/file1 /mnt/fc_move/file2
e4defrag /mnt/fc_move/file1
cat /proc/fs/ext4/loop0/fc_info
shows "Move extents": > 0 and fc stats ineligible > 0.
--- fs/ext4/fast_commit.c | 1 + fs/ext4/fast_commit.h | 1 + fs/ext4/move_extent.c | 1 + include/trace/events/ext4.h | 4 +++- 4 files changed, 6 insertions(+), 1 deletion(-)
fs/ext4/fast_commit.c +1 -0
@@ -2304,6 +2304,7 @@ static const char * const fc_ineligible_reasons[] = { [EXT4_FC_REASON_ENCRYPTED_FILENAME] = "Encrypted filename", [EXT4_FC_REASON_MIGRATE] = "Inode format migration", [EXT4_FC_REASON_VERITY] = "fs-verity enable", + [EXT4_FC_REASON_MOVE_EXT] = "Move extents", };int ext4_fc_info_show (struct seq_file *seq,void *v)
fs/ext4/fast_commit.h +1 -0
@@ -99,6 +99,7 @@ enum {EXT4_FC_REASON_ENCRYPTED_FILENAME ,EXT4_FC_REASON_MIGRATE ,EXT4_FC_REASON_VERITY , +EXT4_FC_REASON_MOVE_EXT , EXT4_FC_REASON_MAX };
fs/ext4/move_extent.c +1 -0
@@ -287,6 +287,7 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode, *err =PTR_ERR (handle);return 0 ; } +ext4_fc_mark_ineligible (sb,EXT4_FC_REASON_MOVE_EXT , handle); orig_blk_offset = orig_page_offset * blocks_per_page + data_offset_in_page;
include/trace/events/ext4.h +3 -1
@@ -104,6 +104,7 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_INODE_JOURNAL_DATA);TRACE_DEFINE_ENUM (EXT4_FC_REASON_ENCRYPTED_FILENAME );TRACE_DEFINE_ENUM (EXT4_FC_REASON_MIGRATE );TRACE_DEFINE_ENUM (EXT4_FC_REASON_VERITY ); +TRACE_DEFINE_ENUM (EXT4_FC_REASON_MOVE_EXT );TRACE_DEFINE_ENUM (EXT4_FC_REASON_MAX );#define show_fc_reason (reason) \
@@ -119,7 +120,8 @@ TRACE_DEFINE_ENUM(EXT4_FC_REASON_MAX); { EXT4_FC_REASON_INODE_JOURNAL_DATA, "INODE_JOURNAL_DATA"}, \ { EXT4_FC_REASON_ENCRYPTED_FILENAME, "ENCRYPTED_FILENAME"}, \ { EXT4_FC_REASON_MIGRATE, "MIGRATE"}, \ - { EXT4_FC_REASON_VERITY, "VERITY"}) + { EXT4_FC_REASON_VERITY, "VERITY"}, \ + { EXT4_FC_REASON_MOVE_EXT, "MOVE_EXT"})TRACE_DEFINE_ENUM (CR_POWER2_ALIGNED );TRACE_DEFINE_ENUM (CR_GOAL_LEN_FAST );
Signature · 1 line
2.51.0
RFC 4/5 ext4: mark group add fast-commit ineligible
In reply to Li ChenFast commits only log operations that have dedicated replay support. Online resize via EXT4_IOC_GROUP_ADD updates the superblock and group descriptor metadata without going through the fast commit tracking paths.
In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.
Teach ext4 to mark the filesystem fast-commit ineligible when ext4_ioctl_group_add() adds new block groups.
This forces those transactions to fall back to a full commit, ensuring that the filesystem geometry updates are captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes online resize via GROUP_ADD safer and easier to reason about under fast commit.
Testing:
1. prepare:
dd if=/dev/zero of=/root/fc_resize.img bs=1M count=0 seek=256
mkfs.ext4 -O fast_commit -F /root/fc_resize.img
mkdir -p /mnt/fc_resize && mount -t ext4 -o loop /root/fc_resize.img /mnt/fc_resize
2. Ran a helper that issues EXT4_IOC_GROUP_ADD on the mounted
filesystem and checked the resize ineligible reason:
./group_add_helper /mnt/fc_resize
cat /proc/fs/ext4/loop0/fc_info
shows "Resize": > 0.
3. Fsynced a file on the resized filesystem and verified that the fast
commit stats report at least one ineligible commit:
touch /mnt/fc_resize/file
/root/fsync_file /mnt/fc_resize/file
sync
cat /proc/fs/ext4/loop0/fc_infoshows fc stats ineligible > 0.
--- fs/ext4/ioctl.c | 1 + 1 file changed, 1 insertion(+)
fs/ext4/ioctl.c +1 -0
@@ -966,6 +966,7 @@ static long ext4_ioctl_group_add(struct file *file, err =ext4_group_add (sb, input);if (EXT4_SB (sb)->s_journal) { +ext4_fc_mark_ineligible (sb,EXT4_FC_REASON_RESIZE ,NULL );jbd2_journal_lock_updates (EXT4_SB (sb)->s_journal); err2 =jbd2_journal_flush (EXT4_SB (sb)->s_journal,0 );jbd2_journal_unlock_updates (EXT4_SB (sb)->s_journal);
Signature · 1 line
2.51.0
RFC 5/5 ext4: mark group extend fast-commit ineligible
In reply to Li ChenFast commits only log operations that have dedicated replay support. EXT4_IOC_GROUP_EXTEND grows the filesystem to the end of the last block group and updates the same on-disk metadata without going through the fast commit tracking paths.
In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.
Teach ext4 to mark the filesystem fast-commit ineligible when EXT4_IOC_GROUP_EXTEND grows the filesystem.
This forces those transactions to fall back to a full commit, ensuring that the group extension changes are captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes online resize via GROUP_EXTEND safer and easier to reason about under fast commit.
Testing:
1. prepare:
dd if=/dev/zero of=/root/fc_resize.img bs=1M count=0 seek=256
mkfs.ext4 -O fast_commit -F /root/fc_resize.img
mkdir -p /mnt/fc_resize && mount -t ext4 -o loop /root/fc_resize.img /mnt/fc_resize
2. Extended the filesystem to the end of the last block group using a
helper that calls EXT4_IOC_GROUP_EXTEND on the mounted filesystem
and checked fc_info:
./group_extend_helper /mnt/fc_resize
cat /proc/fs/ext4/loop0/fc_info
shows the "Resize" ineligible reason increased.
3. Fsynced a file on the resized filesystem and confirmed that the fast
commit ineligible counter incremented for the resize transaction:
touch /mnt/fc_resize/file
/root/fsync_file /mnt/fc_resize/file
sync
cat /proc/fs/ext4/loop0/fc_info--- fs/ext4/ioctl.c | 2 ++ 1 file changed, 2 insertions(+)
fs/ext4/ioctl.c +2 -0
@@ -1608,6 +1608,8 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) err =ext4_group_extend (sb,EXT4_SB (sb)->s_es, n_blocks_count);if (EXT4_SB (sb)->s_journal) { +ext4_fc_mark_ineligible (sb,EXT4_FC_REASON_RESIZE , +NULL );jbd2_journal_lock_updates (EXT4_SB (sb)->s_journal); err2 =jbd2_journal_flush (EXT4_SB (sb)->s_journal,0 );jbd2_journal_unlock_updates (EXT4_SB (sb)->s_journal);
Signature · 1 line
2.51.0
Theodore Tso
maintainerRe: [RFC 5/5] ext4: mark group extend fast-commit ineligible
Quoted 36 lines · Li Chen
Fast commits only log operations that have dedicated replay support.
EXT4_IOC_GROUP_EXTENDgrows the filesystem to the end of the last block group and updates the same on-disk metadata without going through the fast commit tracking paths.
In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.Teach ext4 to mark the filesystem fast-commit ineligible when
EXT4_IOC_GROUP_EXTENDgrows the filesystem.
This forces those transactions to fall back to a full commit, ensuring that the group extension changes are captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes online resize viaGROUP_EXTENDsafer and easier to reason about under fast commit.Testing:
1. prepare:dd if=/dev/zero of=/root/fc_resize.img bs=1M count=0 seek=256 mkfs.ext4 -O fast_commit -F /root/fc_resize.img mkdir -p /mnt/fc_resize && mount -t ext4 -o loop /root/fc_resize.img /mnt/fc_resize 2. Extended the filesystem to the end of the last block group using a helper that calls EXT4_IOC_GROUP_EXTEND on the mounted filesystem and checked fc_info: ./group_extend_helper /mnt/fc_resize cat /proc/fs/ext4/loop0/fc_info shows the "Resize" ineligible reason increased. 3. Fsynced a file on the resized filesystem and confirmed that the fast commit ineligible counter incremented for the resize transaction: touch /mnt/fc_resize/file /root/fsync_file /mnt/fc_resize/file sync cat /proc/fs/ext4/loop0/fc_info
Quoted 1 line
Signed-off-by Li Chen <[email protected]>
I'm curious what version of the kernel you were testing against? I needed to mnake the final fix up to allow the patch to compile:
fs/ext4/move_extent.c +2 -1
@@ -321,7 +321,8 @@ static int mext_move_extent(struct mext_data *mext, u64 *m_len) ret =PTR_ERR (handle); goto out; } -ext4_fc_mark_ineligible (sb,EXT4_FC_REASON_MOVE_EXT , handle); +ext4_fc_mark_ineligible (orig_inode->i_sb,EXT4_FC_REASON_MOVE_EXT , + handle); ret =mext_move_begin (mext, folio, &move_type);if (ret)
- Ted
Theodore Tso
maintainerRe: [RFC 5/5] ext4: mark group extend fast-commit ineligible
Quoted 3 lines · Theodore Tso
I'm curious what version of the kernel you were testing against? I needed to mnake the final fix up to allow the patch to compile:
Oops, sorry, I replied to the wrong patch. This fix is relevant to:
[RFC 3/5] ext4: mark move extents fast-commit ineligible
- Ted
Re: [RFC 5/5] ext4: mark group extend fast-commit ineligible
In reply to Theodore TsoHi Theodore,
Thanks for your reply.
Quoted 37 lines · Li Chen
Quoted 36 lines
Fast commits only log operations that have dedicated replay support.
EXT4_IOC_GROUP_EXTENDgrows the filesystem to the end of the last block group and updates the same on-disk metadata without going through the fast commit tracking paths.
In practice these operations are rare and usually followed by further updates, but mixing them into a fast commit makes the overall semantics harder to reason about and risks replay gaps if new call sites appear.Teach ext4 to mark the filesystem fast-commit ineligible when
EXT4_IOC_GROUP_EXTENDgrows the filesystem.
This forces those transactions to fall back to a full commit, ensuring that the group extension changes are captured by the normal journal rather than partially encoded in fast commit TLVs. This change should not affect common workloads but makes online resize viaGROUP_EXTENDsafer and easier to reason about under fast commit.Testing:
1. prepare:dd if=/dev/zero of=/root/fc_resize.img bs=1M count=0 seek=256 mkfs.ext4 -O fast_commit -F /root/fc_resize.img mkdir -p /mnt/fc_resize && mount -t ext4 -o loop /root/fc_resize.img /mnt/fc_resize 2. Extended the filesystem to the end of the last block group using a helper that calls EXT4_IOC_GROUP_EXTEND on the mounted filesystem and checked fc_info: ./group_extend_helper /mnt/fc_resize cat /proc/fs/ext4/loop0/fc_info shows the "Resize" ineligible reason increased. 3. Fsynced a file on the resized filesystem and confirmed that the fast commit ineligible counter incremented for the resize transaction: touch /mnt/fc_resize/file /root/fsync_file /mnt/fc_resize/file sync cat /proc/fs/ext4/loop0/fc_info
Quoted 4 lines
Quoted 1 line
Signed-off-by Li Chen <[email protected]>I'm curious what version of the kernel you were testing against? I needed to mnake the final fix up to allow the patch to compile:
I'm sorry I didn't mention the kernel version in the cover letter. This patchset is built against 7d0a66e4bb90 (tag: v6.18) Linux 6.18.
Regards,
Li
Quoted 17 lines
fs/ext4/move_extent.c +2
-1@@ -321,7 +321,8 @@ static int mext_move_extent(struct mext_data *mext, u64 *m_len) ret =PTR_ERR (handle); goto out; } -ext4_fc_mark_ineligible (sb,EXT4_FC_REASON_MOVE_EXT , handle); +ext4_fc_mark_ineligible (orig_inode->i_sb,EXT4_FC_REASON_MOVE_EXT , + handle); ret =mext_move_begin (mext, folio, &move_type);if (ret)- Ted
Quoted 11 lines · Li Chen
ext4 fast commit only logs operations with replay support. This series marks a few more operations as fast-commit ineligible and accounts them via
fc_infoso behaviour under fast commit is easier to reason about.Testing was done in a QEMU guest on loopback ext4 filesystems created with -O fast_commit[/,verity] by exercising each operation and checking
/proc/fs/ext4/*/fc_infofor the corresponding ineligible reason and ineligible commit counters. Detailed steps are in each commit's message.[...]
Applied, thanks!
[1/5] ext4: mark inode format migration fast-commit ineligible
commit: 87e79fa122bc9a6576f1690ee264fcbd77d3ab58
[2/5] ext4: mark fs-verity enable fast-commit ineligible
commit: 16d43b9748c655b36a675cc55789f40fd827e9b1
[3/5] ext4: mark move extents fast-commit ineligible
commit: 690558921d9f9388c6bc83610451d8cb393e4d88
[4/5] ext4: mark group add fast-commit ineligible
commit: 89b4336fd5ec78f51f9d3a1d100f3ffa3228e604
[5/5] ext4: mark group extend fast-commit ineligible
commit: 1f8dd813a1c771b13c303f73d876164bc9b327ccBest regards,
Signature · 1 line
Theodore Ts'o <[email protected]>