Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10782255rwl; Thu, 12 Jan 2023 02:27:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXtYqGfyNBwrn7DB3jf3s4yEZfnVuRHgKoCfTgSVV63KI9PIFLHVgSikS59YUBPWLk6wMcoI X-Received: by 2002:a05:6402:5006:b0:499:d1ca:6d82 with SMTP id p6-20020a056402500600b00499d1ca6d82mr7632546eda.31.1673519237039; Thu, 12 Jan 2023 02:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673519237; cv=none; d=google.com; s=arc-20160816; b=lLQqs7Ef60H5UBWIN/EtFPuvajF3f9tBMv7gUncMZuN0ucGjY5z1tpJvQfdud6NI3G v6odaWxta+ptvfgAWoVPqLlxckw8fLxI5xssPxtSXkVjoAKP4GQh9Or8RLIPad8ygEUH qaR/rK4/ejuHHorJh3OgE7HxCjq4jqx++J/DNlbxwbuwTsCLmZOgqQopJSsEZcUBX+9L pjF0YC8w8bod0awMeya/t7pvOgnvIMXHAmPeCNfHdD3upiPnSRrYWTT24KE4c6JrgWe6 FzZFV6abcn/yVZSUY+Jfo9hFu7Xcd/v2sJP/XdqGfXKFgp5BiiWv2Dj7zhRJWJuLBMEn YQ+A== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/c5Fx3TuaiNl3z9LI7DPQoGWqtNXp0hLanw0Zc4wWPQ=; b=fxUHfTtWhH8c52W4sdI4hFZ2Gy+WqqiYn01G6sykxoBd1BTlPGlAyn2smJBPvX7sCd anP3YK2ntRHklhzFOpwL4CyjVZAxxl1PyoJMD2VsKGcgHxr3eZPQpIKinOpse3n5MLYs g6SQQDvyRqK71QhyFAEBRwOH0JaspDeXZfMneM5QCKrb/IeJ7+5Xwa6UH/tHBI9yaHiS 0IvvHk6mA7hVZCH4vKPGiyHYiToj07iuCAsUBnpwzo+8FaKLRqOd6Gsb+Bo6s/Xewgti /xUW4X3nh/Fa3l2uZ13WAHMYqS1CIukHDjYsww36PV04BzjYfTEDdK6f3hcyle1pviGu GYbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eZkRMqYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id en14-20020a056402528e00b00499e590d47esi4799797edb.36.2023.01.12.02.27.03; Thu, 12 Jan 2023 02:27:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eZkRMqYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240029AbjALKQW (ORCPT + 51 others); Thu, 12 Jan 2023 05:16:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbjALKPB (ORCPT ); Thu, 12 Jan 2023 05:15:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD81962F6; Thu, 12 Jan 2023 02:14:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46EDE61FC6; Thu, 12 Jan 2023 10:14:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBBE5C433F1; Thu, 12 Jan 2023 10:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673518467; bh=H0qpAy+h+AneY0RPAYaiUWjuu9etUicEYCaT4nEEvoI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eZkRMqYwCXUCQxKOAi+15/baSqh41shr4qGIVTj4nISV5aSm9OiJcgOHHn+rrGn2+ EI+Ba1q+WT2FkAQpyn89m/hkyFDRC5R6g2Noxxb29XWasdBhYrTdAzdZidEPqDY1qK R03ofZub6YJtzTw4lPRWrjkylQ/g8tswTIEjq13KJR/73DFyF449aLNTcFnh6o5idY 0CaSVVKQup0CVXQZ5oq6mMEJbft88GLo3sq7ntzZyOJLkhEYuDeoFcTCMArg7sP/0g qWJ7DinLWOmu0Kei05Noo4Pt2DMRuDR2CiVgygBSBO+zJ1MKt7UhYcShhwe+aj+emM WDeeiiTHh8Tjg== Message-ID: Date: Thu, 12 Jan 2023 18:14:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [f2fs-dev] [PATCH v2] f2fs: retry to update the inode page given EIO Content-Language: en-US To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, stable@vger.kernel.org References: <20230105233908.1030651-1-jaegeuk@kernel.org> <77b18266-69c4-c7f0-0eab-d2069a7b21d5@kernel.org> From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/1/12 2:50, Jaegeuk Kim wrote: > On 01/11, Chao Yu wrote: >> On 2023/1/11 9:20, Jaegeuk Kim wrote: >>> In f2fs_update_inode_page, f2fs_get_node_page handles EIO along with >>> f2fs_handle_page_eio that stops checkpoint, if the disk couldn't be recovered. >>> As a result, we don't need to stop checkpoint right away given single EIO. >> >> f2fs_handle_page_eio() only covers the case that EIO occurs on the same >> page, should we cover the case EIO occurs on different pages? > > Which case are you looking at? - __get_node_page(PageA) - __get_node_page(PageB) - f2fs_handle_page_eio - sbi->page_eio_ofs[type] = PageA->index - f2fs_handle_page_eio - sbi->page_eio_ofs[type] = PageB->index In such race case, it may has low probability to set CP_ERROR_FLAG as we expect? Thanks, > >> >> Thanks, >> >>> >>> Cc: stable@vger.kernel.org >>> Signed-off-by: Randall Huang >>> Signed-off-by: Jaegeuk Kim >>> --- >>> >>> Change log from v1: >>> - fix a bug >>> >>> fs/f2fs/inode.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c >>> index ff6cf66ed46b..2ed7a621fdf1 100644 >>> --- a/fs/f2fs/inode.c >>> +++ b/fs/f2fs/inode.c >>> @@ -719,7 +719,7 @@ void f2fs_update_inode_page(struct inode *inode) >>> if (IS_ERR(node_page)) { >>> int err = PTR_ERR(node_page); >>> - if (err == -ENOMEM) { >>> + if (err == -ENOMEM || (err == -EIO && !f2fs_cp_error(sbi))) { >>> cond_resched(); >>> goto retry; >>> } else if (err != -ENOENT) {