Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp259606rdb; Thu, 16 Nov 2023 19:28:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwN2eQONLXFrunKx9JMb476L8h7ubdwHqyRM9GBy1HwPa+JvKLJBNli7mb4OO6zkgsow1B X-Received: by 2002:a05:6a21:339e:b0:171:a8bc:74b2 with SMTP id yy30-20020a056a21339e00b00171a8bc74b2mr17646086pzb.7.1700191736311; Thu, 16 Nov 2023 19:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700191736; cv=none; d=google.com; s=arc-20160816; b=lV1CoYNmbaj6bxm2+cJaLoziPOPv2KMPt5RpAzUQSLmADAVgyBLL8qrvwWmUBx/YjB QAUZamAMr2gCZG3Myny8DL+wtjMp8zas7sV7gRljDkDxcBFzPnDoHXCDeRLYKI6ccOYm A6M5wpjLFbmw3eSbw/sNcNm9sKMWUybeop3c9fsGma+lJyNYH/wyaOx4yJv+4VDqYhbA +3RHOC5Jy4G1BfimevzgyseiVG0JgSysSetEjZXTM93/BJrLD6gTLXa9ZaEZVjfjRSnY taJ/3DcuWeTvth4sE3XB7DbipPASLSlLABpQw9z241eVpYcdzPEEEH6SENYRG5d4ZYpi drkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=t1QptpHB+j2hjtkZxMW66dbJO4vcH9gktTNMOo4SZM8=; fh=ueuZSsvDFGgiarAgEABTp+we1l8vmUx7YSrARnUNNXk=; b=ZYvN988t54pXVHOONOsu8k6bZgbdSrbF8A0KTnFMpAFFIyhhg58YYTGEWzRZjxag8i 85Tgiw0bfb59B0Zx0aPoCQRrHN6N/2s4OGWFeDDzk5wHDEphDI2dOh9F+Ssroc+WluRe BoRxdAv0RXCtE/K2JOyytmucI2Vd0Lw8yXxbFhfSLU5LyqmELyj8oSxJabkEz0m7UUYu Xk77B8TsNMEYhdpr7rCDv7UgS/g5QCLNxjoC6NO5kOwN7bSbCCXKt3etLeYukeV/aI4L 5DMdPUbT6vGnBB6a1VAUybno/U0EPQe36cYr3zj7O8rbfC4V8Y/zCpQmgkeJnrZgY34G QQBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=endsVjoD; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ei15-20020a17090ae54f00b002800b0fa4f2si3330062pjb.104.2023.11.16.19.28.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 19:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=endsVjoD; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 56943820001C; Thu, 16 Nov 2023 19:28:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345656AbjKQD2u (ORCPT + 99 others); Thu, 16 Nov 2023 22:28:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjKQD2t (ORCPT ); Thu, 16 Nov 2023 22:28:49 -0500 Received: from out203-205-221-235.mail.qq.com (out203-205-221-235.mail.qq.com [203.205.221.235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FBA2B0; Thu, 16 Nov 2023 19:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1700191722; bh=t1QptpHB+j2hjtkZxMW66dbJO4vcH9gktTNMOo4SZM8=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=endsVjoD/yjsuV0gPrvweXz68xdycKohLRDSx8f+mEL2URPffLmCRjs+fS5slelfg jWcWNeE10wZYVgBm1c7dIufnDvUEdGt7WRH+8lHxKIawSew/Qmu09glu9B3esF8CJ5 zf9E4zBoXh7pzLK0vBHLFSyQJ6bEBUS+Z5FgJQ9g= Received: from [192.168.31.137] ([116.128.244.171]) by newxmesmtplogicsvrsza12-0.qq.com (NewEsmtp) with SMTP id 7243DE1E; Fri, 17 Nov 2023 11:28:36 +0800 X-QQ-mid: xmsmtpt1700191716tu68o2yw3 Message-ID: X-QQ-XMAILINFO: MX+1SEN3H+wAZ8oLfd06aJMpam71+X3o79wb4d4a3ttV8WyaYYa10p5AmZRBVD zJuOWN3vKJFxXxc/yyZPPLXsY0CKTd117/GCz6d05d5xrKsi7VEXfjCU1tKrQk4G11uoyqiIwFpf hwI5BxxXgdpNlT9dwCDLj65GmdsiwWQCEqKonaMfxZBVX34JBEYEiR1TiQCA3xuaESwj+iI48kaF sIfe+0eACZ65KaBr4/AQ5MkERyo8Z6mjaq3jBYHMjszTrSwxlDhks3c02CEuhRqxTP0osKFFEVlv YoOQ87g6hU9om2cq352Emev8o9nJCFreKRvqrHsxuW51wtIByQ0bzkisDHs03BC0MSIpMgWq0Nxc s7rKv+OJJYeN3OeyU2kd+v32A9WXfS0SKDVOofuWW2z8xsH2rRs8VyAtGTui0wKl3IK1xkiKGZOx PQCqhqvPYtRf5pl4bCB2cWLYyBSz2wHaKmhmahnQdl2sNzlOOvisqEeMt/zsND2thXgicrEw/Izn Ui6Fv8lBrSKKVroUB2rCKiLg4trmXFySMb9c3Lkj7wmFWRWQy971UUELcRh9pX1kVh8D/uQ2zMzS 9P2fUhHt1PZ+twZdKxO2Vk7uI2/+dfxyDXHDnvW+f1JH4baptALWagHxP+WpyCPqRcgrzYJ4SbCF uYSd8K/+gFnVtq/Bs2dnd6nNwuXSBNe4/PraG/eaRTUCvU4LoEzSflD/5skCTsGvHzfYwGJ3fhdX CrkKd1AKuMEkDhQRtjjy0PTr9DfCmKEt33E9s/7241Dcx1UPnlZbFoT6Jxt58Ev9V+IYlE+tzlcA GY0fmfYCYwGOSWiAWvPyD0AvwoAji0S3mE1SCalWi456hFjMhLUfGykkLyCcDpXq1Q6vT9Ls79nL vOF9WgNTWJRLqn7jCbBju2oUwJzDlPo3hZ5SzbAVkIJ1MhanfNS8zVDF5iTenZJM11dXqQrxRK X-QQ-XMRINFO: Nq+8W0+stu50PRdwbJxPCL0= X-OQ-MSGID: <835b2d65-0124-436f-9d31-21f0fb3bb48d@foxmail.com> Date: Fri, 17 Nov 2023 11:28:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Question about LTS 4.19 patch "89047634f5ce NFS: Don't interrupt file writeout due to fatal errors" To: Trond Myklebust , "gregkh@linuxfoundation.org" Cc: "linux-nfs@vger.kernel.org" , "chenxiaosong@kylinos.cn" , "stable@vger.kernel.org" , "huangjinhui@kylinos.cn" , "liuzhengyuan@kylinos.cn" , "liuyun01@kylinos.cn" , "huhai@kylinos.cn" , "sashal@kernel.org" , "linux-kernel@vger.kernel.org" , "Anna.Schumaker@netapp.com" References: <2023103055-anaerobic-childhood-c1f1@gregkh> <2023103055-saddled-payer-bd26@gregkh> <3b8caab5918d06f436a889bc1dba09686fc0fad5.camel@hammerspace.com> Content-Language: en-US From: ChenXiaoSong In-Reply-To: <3b8caab5918d06f436a889bc1dba09686fc0fad5.camel@hammerspace.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 16 Nov 2023 19:28:49 -0800 (PST) On 2023/10/30 22:56, Trond Myklebust wrote: > A refactoring is by definition a change that does not affect code > behaviour. It is obvious that this was never intended to be such a > patch. > > The reason that the bug is occurring in 4.19.x, and not in the latest > kernels, is because the former is missing another bugfix (one which > actually is missing a "Fixes:" tag). > > Can you therefore please check if applying commit 22876f540bdf ("NFS: > Don't call generic_error_remove_page() while holding locks") fixes the > issue. > > Note that the latter patch is needed in any case in order to fix a read > deadlock (as indicated on the label). > > Thanks, > Trond > After applying commit 22876f540bdf ("NFS: Don't call generic_error_remove_page() while holding locks"), I encountered an issue of infinite loop: write ... nfs_updatepage nfs_writepage_setup nfs_setup_write_request nfs_try_to_update_request nfs_wb_page if (clear_page_dirty_for_io(page)) // true nfs_writepage_locked // return 0 nfs_do_writepage // return 0 nfs_page_async_flush // return 0 nfs_error_is_fatal_on_server nfs_write_error_remove_page SetPageError // instead of generic_error_remove_page // loop begin if (clear_page_dirty_for_io(page)) // false if (!PagePrivate(page)) // false ret = nfs_commit_inode = 0 // loop again, never quit before applying commit 22876f540bdf ("NFS: Don't call generic_error_remove_page() while holding locks"), generic_error_remove_page() will clear PG_private, and infinite loop will never happen: generic_error_remove_page truncate_inode_page truncate_cleanup_page do_invalidatepage nfs_invalidate_page nfs_wb_page_cancel nfs_inode_remove_request ClearPagePrivate(head->wb_page) If applying this patch, are other patches required? And I cannot reproducethe read deadlock bug that the patch want to fix, are there specific conditions required to reproduce this read deadlock bug?