Patch "xfs: fix finobt btree block recovery ordering" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xfs: fix finobt btree block recovery ordering

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-fix-finobt-btree-block-recovery-ordering.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From chandan.babu@xxxxxxxxxx Thu Feb 16 06:21:43 2023
From: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Date: Thu, 16 Feb 2023 10:50:04 +0530
Subject: xfs: fix finobt btree block recovery ordering
To: gregkh@xxxxxxxxxxxxxxxxxxx
Cc: sashal@xxxxxxxxxx, mcgrof@xxxxxxxxxx, linux-xfs@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx, djwong@xxxxxxxxxx, chandan.babu@xxxxxxxxxx, amir73il@xxxxxxxxx, leah.rumancik@xxxxxxxxx
Message-ID: <20230216052019.368896-11-chandan.babu@xxxxxxxxxx>

From: Dave Chinner <dchinner@xxxxxxxxxx>

commit 671459676ab0e1d371c8d6b184ad1faa05b6941e upstream.

[ In 5.4.y, xlog_recover_get_buf_lsn() is defined inside
  fs/xfs/xfs_log_recover.c ]

Nathan popped up on #xfs and pointed out that we fail to handle
finobt btree blocks in xlog_recover_get_buf_lsn(). This means they
always fall through the entire magic number matching code to "recover
immediately". Whilst most of the time this is the correct behaviour,
occasionally it will be incorrect and could potentially overwrite
more recent metadata because we don't check the LSN in the on disk
metadata at all.

This bug has been present since the finobt was first introduced, and
is a potential cause of the occasional xfs_iget_check_free_state()
failures we see that indicate that the inode btree state does not
match the on disk inode state.

Fixes: aafc3c246529 ("xfs: support the XFS_BTNUM_FINOBT free inode btree type")
Reported-by: Nathan Scott <nathans@xxxxxxxxxx>
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
Signed-off-by: Chandan Babu R <chandan.babu@xxxxxxxxxx>
Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/xfs/xfs_log_recover.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2206,6 +2206,8 @@ xlog_recover_get_buf_lsn(
 	case XFS_ABTC_MAGIC:
 	case XFS_RMAP_CRC_MAGIC:
 	case XFS_REFC_CRC_MAGIC:
+	case XFS_FIBT_CRC_MAGIC:
+	case XFS_FIBT_MAGIC:
 	case XFS_IBT_CRC_MAGIC:
 	case XFS_IBT_MAGIC: {
 		struct xfs_btree_block *btb = blk;


Patches currently in stable-queue which might be from chandan.babu@xxxxxxxxxx are

queue-5.4/xfs-remove-the-xfs_efd_log_item_t-typedef.patch
queue-5.4/xfs-change-the-order-in-which-child-and-parent-defer-ops-are-finished.patch
queue-5.4/xfs-refactor-xfs_defer_finish_noroll.patch
queue-5.4/xfs-sync-lazy-sb-accounting-on-quiesce-of-read-only-mounts.patch
queue-5.4/xfs-clean-up-xfs_bui_item_recover-iget-trans_alloc-ilock-ordering.patch
queue-5.4/xfs-xfs_defer_capture-should-absorb-remaining-block-reservations.patch
queue-5.4/xfs-factor-out-a-xfs_defer_create_intent-helper.patch
queue-5.4/xfs-turn-dfp_intent-into-a-xfs_log_item.patch
queue-5.4/xfs-fix-finobt-btree-block-recovery-ordering.patch
queue-5.4/xfs-xfs_defer_capture-should-absorb-remaining-transaction-reservation.patch
queue-5.4/xfs-merge-the-diff_items-defer-op-into-create_intent.patch
queue-5.4/xfs-prevent-uaf-in-xfs_log_item_in_current_chkpt.patch
queue-5.4/xfs-fix-missing-cow-blocks-writeback-conversion-retry.patch
queue-5.4/xfs-remove-the-xfs_efi_log_item_t-typedef.patch
queue-5.4/xfs-only-relog-deferred-intent-items-if-free-space-in-the-log-gets-low.patch
queue-5.4/xfs-proper-replay-of-deferred-ops-queued-during-log-recovery.patch
queue-5.4/xfs-clean-up-bmap-intent-item-recovery-checking.patch
queue-5.4/xfs-fix-the-forward-progress-assertion-in-xfs_iwalk_run_callbacks.patch
queue-5.4/xfs-log-new-intent-items-created-as-part-of-finishing-recovered-intent-items.patch
queue-5.4/xfs-ensure-inobt-record-walks-always-make-forward-progress.patch
queue-5.4/xfs-remove-the-xfs_inode_log_item_t-typedef.patch
queue-5.4/xfs-fix-an-incore-inode-uaf-in-xfs_bui_recover.patch
queue-5.4/xfs-expose-the-log-push-threshold.patch
queue-5.4/xfs-periodically-relog-deferred-intent-items.patch
queue-5.4/xfs-merge-the-log_item-defer-op-into-create_intent.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux