xfs: fix log recovery erroring out on refcount recovery failure
PATCH v2 1/1 xfs: fix log recovery erroring out on refcount recovery failure
From: Darrick J. Wong <[email protected]>
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.
---
v2: actually send it to the list this time
--- fs/xfs/xfs_log_recover.c | 1 + 1 file changed, 1 insertion(+)
fs/xfs/xfs_log_recover.c +1 -0
@@ -3532,6 +3532,7 @@ xlog_recover_finish(* and AIL. */ xlog_force_shutdown (log,SHUTDOWN_LOG_IO_ERROR ); + error =0 ; goto out_error; }
Quoted 6 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
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.
Talking about xfs/434, it just caused me some nasty debugging headache last week. It is the first of only three tests requiring a loadable xfs module, and when there is an xfs.ko for the uname around but xfs is built into the kernel as it is for my usual test configs it fails in completely weird and hard to debug ways.
The fact that it requires a modular xfs might also be the reason why it's rarely run.
The fix itself looks good: