diff mbox series

[Bug,201173,xfstests,xfs/137] : xfs_repair hang when it trying to repair a 500t xfs

Message ID bug-201173-201763-obG255pYHJ@https.bugzilla.kernel.org/ (mailing list archive)
State Not Applicable
Headers show
Series [Bug,201173,xfstests,xfs/137] : xfs_repair hang when it trying to repair a 500t xfs | expand

Commit Message

bugzilla-daemon@bugzilla.kernel.org Sept. 22, 2018, 1:35 a.m. UTC
https://bugzilla.kernel.org/show_bug.cgi?id=201173

Eric Sandeen (sandeen@sandeen.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sandeen@sandeen.net
           Assignee|filesystem_xfs@kernel-bugs. |sandeen@sandeen.net
                   |kernel.org                  |

--- Comment #1 from Eric Sandeen (sandeen@sandeen.net) ---
Several hours of debugging later, a simple patch seems to fix this:


but it still feels like a slightly odd fix, will give it more thought.  The
problem is that if every buffer we tried to read ahead in phase6 was already up
to date, pf_start_io_workers has no effect; there is no io to do, and the
sem_wait waits forever.
diff mbox series

Patch

diff --git a/repair/prefetch.c b/repair/prefetch.c
index 9571b24..c9a0748 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -768,8 +768,11 @@  pf_queuing_worker(
                         * might get stuck on a buffer that has been locked
                         * and added to the I/O queue but is waiting for
                         * the thread to be woken.
+                        * Start processing as well, in case everything so
+                        * far was already prefetched and the queue is empty.
                         */
                        pf_start_io_workers(args);
+                       pf_start_processing(args);
                        sem_wait(&args->ra_count);
                }