From patchwork Sat Sep 22 01:35:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@bugzilla.kernel.org X-Patchwork-Id: 10611311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A083157B for ; Sat, 22 Sep 2018 01:35:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 501BB2D9E4 for ; Sat, 22 Sep 2018 01:35:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 446BA2DA09; Sat, 22 Sep 2018 01:35:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD5882D9E4 for ; Sat, 22 Sep 2018 01:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726312AbeIVH05 convert rfc822-to-8bit (ORCPT ); Sat, 22 Sep 2018 03:26:57 -0400 Received: from mail.wl.linuxfoundation.org ([198.145.29.98]:49596 "EHLO mail.wl.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725756AbeIVH05 (ORCPT ); Sat, 22 Sep 2018 03:26:57 -0400 Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F217F2D9FE for ; Sat, 22 Sep 2018 01:35:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E64CA2DA33; Sat, 22 Sep 2018 01:35:25 +0000 (UTC) From: bugzilla-daemon@bugzilla.kernel.org To: linux-xfs@kernel.org Subject: [Bug 201173] [xfstests xfs/137]: xfs_repair hang when it trying to repair a 500t xfs Date: Sat, 22 Sep 2018 01:35:25 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo filesystem_xfs@kernel-bugs.kernel.org X-Bugzilla-Product: File System X-Bugzilla-Component: XFS X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sandeen@sandeen.net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: sandeen@sandeen.net X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --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); }