From patchwork Tue Sep 6 01:55:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Simmons X-Patchwork-Id: 12966723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from pdx1-mailman-customer002.dreamhost.com (listserver-buz.dreamhost.com [69.163.136.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05912ECAAA1 for ; Tue, 6 Sep 2022 01:55:49 +0000 (UTC) Received: from pdx1-mailman-customer002.dreamhost.com (localhost [127.0.0.1]) by pdx1-mailman-customer002.dreamhost.com (Postfix) with ESMTP id 4MM7l70TRGz1y6r; Mon, 5 Sep 2022 18:55:47 -0700 (PDT) Received: from smtp4.ccs.ornl.gov (smtp4.ccs.ornl.gov [160.91.203.40]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pdx1-mailman-customer002.dreamhost.com (Postfix) with ESMTPS id 4MM7l45Hmvz1y64 for ; Mon, 5 Sep 2022 18:55:44 -0700 (PDT) Received: from star.ccs.ornl.gov (star.ccs.ornl.gov [160.91.202.134]) by smtp4.ccs.ornl.gov (Postfix) with ESMTP id B067A100AFF9; Mon, 5 Sep 2022 21:55:39 -0400 (EDT) Received: by star.ccs.ornl.gov (Postfix, from userid 2004) id A183F589A1; Mon, 5 Sep 2022 21:55:39 -0400 (EDT) From: James Simmons To: Andreas Dilger , Oleg Drokin , NeilBrown Date: Mon, 5 Sep 2022 21:55:18 -0400 Message-Id: <1662429337-18737-6-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1662429337-18737-1-git-send-email-jsimmons@infradead.org> References: <1662429337-18737-1-git-send-email-jsimmons@infradead.org> Subject: [lustre-devel] [PATCH 05/24] lustre: llite: use fatal_signal_pending in range_lock X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List MIME-Version: 1.0 Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" From: Qian Yingjin FIO io_uring failed with one file shared by two FIO processes under newer kernels. After analyzed, we found that range_lock() function return -ERESTARTSYS when there pending signal on current process in Lustre I/O. This causes -EINTR returned to the application. we solve this bug by replacing @signal_pending(current) with @fatal_signal_pending(current) in range_lock(). The range_lock() function only returns -ERESTARTSYS when the current process has fatal pending signal such as SIGKILL. WC-bug-id: https://jira.whamcloud.com/browse/LU-15994 Lustre-commit: 4c5b0b0967f052af3 ("LU-15994 llite: use fatal_signal_pending in range_lock") Signed-off-by: Qian Yingjin Reviewed-on: https://review.whamcloud.com/48106 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- fs/lustre/obdclass/range_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/lustre/obdclass/range_lock.c b/fs/lustre/obdclass/range_lock.c index 2af6385..9731e57 100644 --- a/fs/lustre/obdclass/range_lock.c +++ b/fs/lustre/obdclass/range_lock.c @@ -159,7 +159,7 @@ int range_lock(struct range_lock_tree *tree, struct range_lock *lock) spin_unlock(&tree->rlt_lock); schedule(); - if (signal_pending(current)) { + if (fatal_signal_pending(current)) { range_unlock(tree, lock); rc = -ERESTARTSYS; goto out;