xfs: fix log recovery erroring out on refcount recovery failure
authorDarrick J. Wong <djwong@kernel.org>
Fri, 23 Feb 2024 05:48:17 +0000 (21:48 -0800)
committerChandan Babu R <chandanbabu@kernel.org>
Sat, 24 Feb 2024 05:13:26 +0000 (10:43 +0530)
Per the comment in the error case of xfs_reflink_recover_cow, zero out
any error (after shutting down the log) so that we actually kill any new
intent items that might have gotten logged by later recovery steps.
Discovered by xfs/434, which few people actually seem to run.

Fixes: 2c1e31ed5c88 ("xfs: place intent recovery under NOFS allocation context")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/xfs_log_recover.c

index cd134830a695ad3ec413dd8e122fb031e0cee717..13f1d2e915405e3359211370ecf1c6e39209fbad 100644 (file)
@@ -3532,6 +3532,7 @@ xlog_recover_finish(
                 * and AIL.
                 */
                xlog_force_shutdown(log, SHUTDOWN_LOG_IO_ERROR);
+               error = 0;
                goto out_error;
        }