diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-11-04 05:19:18 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-11-05 22:38:39 +0100 |
commit | 76d3be00df91a56f7c05142ed500f8f8544d5457 (patch) | |
tree | 813a1a59fe7f028f6b2e158e437fc5f233c0899e /fs/xfs/xfs_buf_item_recover.c | |
parent | xfs: check the realtime superblock at mount time (diff) | |
download | linux-76d3be00df91a56f7c05142ed500f8f8544d5457.tar.xz linux-76d3be00df91a56f7c05142ed500f8f8544d5457.zip |
xfs: update realtime super every time we update the primary fs super
Every time we update parts of the primary filesystem superblock that are
echoed in the rt superblock, we must update the rt super. Avoid
changing the log to support logging to the rt device by using ordered
buffers.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_buf_item_recover.c')
-rw-r--r-- | fs/xfs/xfs_buf_item_recover.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c index c8259ee482fd..feb3db2e8916 100644 --- a/fs/xfs/xfs_buf_item_recover.c +++ b/fs/xfs/xfs_buf_item_recover.c @@ -1061,6 +1061,18 @@ xlog_recover_buf_commit_pass2( current_lsn); if (error) goto out_release; + + /* Update the rt superblock if we have one. */ + if (xfs_has_rtsb(mp) && mp->m_rtsb_bp) { + struct xfs_buf *rtsb_bp = mp->m_rtsb_bp; + + xfs_buf_lock(rtsb_bp); + xfs_buf_hold(rtsb_bp); + xfs_update_rtsb(rtsb_bp, bp); + rtsb_bp->b_flags |= _XBF_LOGRECOVERY; + xfs_buf_delwri_queue(rtsb_bp, buffer_list); + xfs_buf_relse(rtsb_bp); + } } else { xlog_recover_do_reg_buffer(mp, item, bp, buf_f, current_lsn); } |