]> Git Repo - linux.git/commit
xfs: don't lose solo superblock counter update transactions
authorDarrick J. Wong <[email protected]>
Mon, 2 Dec 2024 18:57:35 +0000 (10:57 -0800)
committerDarrick J. Wong <[email protected]>
Fri, 13 Dec 2024 01:45:11 +0000 (17:45 -0800)
commit3762113b597fa600d4e03300eec048256c546b1c
tree3fca367a93caaf98ac544d206927936f1b346561
parenta004afdc62946d3261f724c6472997085c4f0735
xfs: don't lose solo superblock counter update transactions

Superblock counter updates are tracked via per-transaction counters in
the xfs_trans object.  These changes are then turned into dirty log
items in xfs_trans_apply_sb_deltas just prior to commiting the log items
to the CIL.

However, updating the per-transaction counter deltas do not cause
XFS_TRANS_DIRTY to be set on the transaction.  In other words, a pure sb
counter update will be silently discarded if there are no other dirty
log items attached to the transaction.

This is currently not the case anywhere in the filesystem because sb
counter updates always dirty at least one other metadata item, but let's
not leave a logic bomb.

Signed-off-by: "Darrick J. Wong" <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
fs/xfs/xfs_trans.c
This page took 0.051038 seconds and 4 git commands to generate.