Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9377145rwl; Wed, 11 Jan 2023 05:06:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXvJlu63vy0qGO527Ai9AvDu+eXo39Nd5VkfDHfzQucq7obxS0I6z8eorIbnDneRDXZSp8Cu X-Received: by 2002:a17:902:c144:b0:192:e3b6:7410 with SMTP id 4-20020a170902c14400b00192e3b67410mr22947429plj.28.1673442404858; Wed, 11 Jan 2023 05:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673442404; cv=none; d=google.com; s=arc-20160816; b=VIh8NUPZbdPrCMiZ52zCdM4aF36vEcKNjK3EafDi20tT19tsx+N1Xe+EIJiRmMCAxN 7oaBtUxmFhJXf4ht6oFronnhp0uw4admUjIvsuku2MU3sXMOer4NPflWBk9C+PvtgaiJ hR8kn9uyexmzfpgymSwNs1P++9lSBkuI9PuGqQepCc1wn4CXWoqW45w8B7jf8/Jw9AMw Pd0wKTjyEGwyeUatOpo3uDCaPZf82iYhOUhxSbhLraERIA2gYZQVZSrLUEpWRxOj1Zxu QfbNKnFR/KCnsur1gfUSM5Ctv6sHB5ZIKKZKpovjxptxChetetNUl26CEG5neqZwRqqz jRWQ== 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=eAhqz+OZgCAhIgMyY/rk+2fPoQoshOImGq5fdriPZ7E=; b=QPJ/HRkIi16pw9LJqqrGe+eim+WGbJW1qrA2vSSzoQDDHq8naQA1MHQ0AKuIjEngFE JLHodHFCGDOtehiKThpvrpPKApao8uxxczueW1h9lxNNJBJKs/ohqYlUj2DoaC7UqZF0 kLKZOe0gbq2+rNiwAXwW3EacRXr5laXXIVFNpZo/+TsgyfFHYQnPOaJ3ncAr54kc/Bvg GpgSTWEf08/0PuOl2i7ZI9IJOSsOdE2WoG/p+MEq44hfGo1+6++XuBVpEBlzyneZjWEh fAs+5C7FxZD6Z1devTlEzax3j7iyhii01AUN/RsfpORgWfnUZti2cYd0V48tvU+Q2YIu m1qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P99z6P9T; 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 p5-20020a170902eac500b00189d1d721c4si13088425pld.584.2023.01.11.05.06.37; Wed, 11 Jan 2023 05:06:44 -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=P99z6P9T; 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 S231696AbjAKM5a (ORCPT + 55 others); Wed, 11 Jan 2023 07:57:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbjAKM51 (ORCPT ); Wed, 11 Jan 2023 07:57:27 -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 764CD1C4; Wed, 11 Jan 2023 04:57:26 -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 1ADE561A9C; Wed, 11 Jan 2023 12:57:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3C0CC433EF; Wed, 11 Jan 2023 12:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673441845; bh=2Ok56WfZJaCSfZDKDQWYGdgKxRCuAs08e+mmKxHXkzQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=P99z6P9TEqBjn98Wr/1dWqSNvVmQ/MiFdfbD983uPUSRYD7y4/adFnXkKvBUzUQ8+ Eegqf1WofVKzJ8xD4FKg8yVvV9l1wi86QUvK73kxD8cYVUj1BN/YlSiWd4HcFf34dM OjeqP6kw2bUJq4W3/8OKvUW3ugMnzJKeJ7JoE6Y8DRcqVHmbgyNaD0aCLUJH6nmpgC 1AvxO3/s5st572JmHmHv9d6II0N5Rwdi1d0zrC5OWlj5ZLFTeaZBO1pENzDaMItUcH GvQjQoezGK6ogUFIGiIu/rDjoS1lsCkRKjVlWdAhmvJ5+dY8oulsrEgKiUVdN1Dnc1 yv4veRc//aJFw== Message-ID: <77b18266-69c4-c7f0-0eab-d2069a7b21d5@kernel.org> Date: Wed, 11 Jan 2023 20:57:21 +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 To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: stable@vger.kernel.org References: <20230105233908.1030651-1-jaegeuk@kernel.org> Content-Language: en-US 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/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? 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) {