From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 EDB9FC54EAA for ; Mon, 30 Jan 2023 23:31:07 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pMdcB-0005Vo-Sh; Mon, 30 Jan 2023 23:31:07 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pMdc8-0005Vh-6v for linux-f2fs-devel@lists.sourceforge.net; Mon, 30 Jan 2023 23:31:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=IJDE9Kf/2GBMO+pO9liL+MbrNnD7Wp711YjZrdzld4Y=; b=Q5qw6IYWJrjSe1KJFjJG9gBAht e27sgrGW3BILVzHPC/m3A+RBP1/J0ZlGnEFbmBa3FeAckwW+oYNfYOWTkT4QAC+xNNBluNq5qZemB Yyxhwhqhd/IQ65+1POQQIqaRAw5HhcD8DiQsbaINOBx+s666c2jD5VAoyAA2m7T2n2lw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=IJDE9Kf/2GBMO+pO9liL+MbrNnD7Wp711YjZrdzld4Y=; b=C9uRqe5uOgGQ7Ex/w6VnO5I9Vt rMmkCtH2gFEqrEuALVS9yDla3pP3cny7XIzuR8loUBDpc/nTuUuODb1ln3tPXetIeAusyV2ZZGQq7 tM+GANh7Zz+eLcS9rF7S+6UCecfXfsxS+w2tgacduriwpwIwEWFiCpaQcXb3rFagE4TI=; Received: from sin.source.kernel.org ([145.40.73.55]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pMdc5-0003JY-LC for linux-f2fs-devel@lists.sourceforge.net; Mon, 30 Jan 2023 23:31:03 +0000 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 sin.source.kernel.org (Postfix) with ESMTPS id BDA8ACE1ACC for ; Mon, 30 Jan 2023 23:30:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFD3CC433D2; Mon, 30 Jan 2023 23:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675121450; bh=DpxNNhsxgqKE9Wys4/3ZeGlNxYXe363r24lY4vhPuYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rXhLet066ErVudwXH/t+/yIX96xs6gV1Q0F6a0H4BS4q6xNUr32gRYfLjDxVl5E5Q ihVREUGbLSRlU3K22iL6th9UoELewgWexGIlEXZMVzmcL2VqzkFWMjAkJbZ1HKZHoa 4nD2dm2LyCshkevxjaWgnNLnq1GLf9sXY6Op+k3OveQ8/jzDYVlZJle4kfhii5lZP9 bA+HgJA6uFvVTB+oE22FqD+zLe/JtJW7pPXq+RDTdDsgQxqXC7t7B6v8oZVrB0WUI1 vH4cCvyRFKqaC1BRsdfvvLgS6z3tZksqRy702py23mGDryENvkvExVD1bjIUgeBvpV z/TmBz3Xc5lIg== Date: Mon, 30 Jan 2023 15:30:48 -0800 From: Jaegeuk Kim To: Chao Yu Message-ID: References: <20230105233908.1030651-1-jaegeuk@kernel.org> <77b18266-69c4-c7f0-0eab-d2069a7b21d5@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Headers-End: 1pMdc5-0003JY-LC Subject: Re: [f2fs-dev] [PATCH v2] f2fs: retry to update the inode page given EIO X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 01/28, Chao Yu wrote: > On 2023/1/13 8:01, Jaegeuk Kim wrote: > > On 01/12, Chao Yu wrote: > > > 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? > > > > Do you see that case in products? > > Not yet. > > > I'm trying to avoid setting CP_ERROR_FLAG here. > > Copied, how about using the same logic for node page as meta page, like > we did in f2fs_get_meta_page_retry()? Yeah.. let me send v3 and test a bit. Thanks~ :) > > Thanks, > > > > > > > > > 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) { _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CCF2C636D3 for ; Mon, 30 Jan 2023 23:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbjA3XbE (ORCPT ); Mon, 30 Jan 2023 18:31:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229750AbjA3XbD (ORCPT ); Mon, 30 Jan 2023 18:31:03 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A69C2B086; Mon, 30 Jan 2023 15:30:53 -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 sin.source.kernel.org (Postfix) with ESMTPS id B936BCE1ACA; Mon, 30 Jan 2023 23:30:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFD3CC433D2; Mon, 30 Jan 2023 23:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675121450; bh=DpxNNhsxgqKE9Wys4/3ZeGlNxYXe363r24lY4vhPuYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rXhLet066ErVudwXH/t+/yIX96xs6gV1Q0F6a0H4BS4q6xNUr32gRYfLjDxVl5E5Q ihVREUGbLSRlU3K22iL6th9UoELewgWexGIlEXZMVzmcL2VqzkFWMjAkJbZ1HKZHoa 4nD2dm2LyCshkevxjaWgnNLnq1GLf9sXY6Op+k3OveQ8/jzDYVlZJle4kfhii5lZP9 bA+HgJA6uFvVTB+oE22FqD+zLe/JtJW7pPXq+RDTdDsgQxqXC7t7B6v8oZVrB0WUI1 vH4cCvyRFKqaC1BRsdfvvLgS6z3tZksqRy702py23mGDryENvkvExVD1bjIUgeBvpV z/TmBz3Xc5lIg== Date: Mon, 30 Jan 2023 15:30:48 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, stable@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH v2] f2fs: retry to update the inode page given EIO Message-ID: References: <20230105233908.1030651-1-jaegeuk@kernel.org> <77b18266-69c4-c7f0-0eab-d2069a7b21d5@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On 01/28, Chao Yu wrote: > On 2023/1/13 8:01, Jaegeuk Kim wrote: > > On 01/12, Chao Yu wrote: > > > 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? > > > > Do you see that case in products? > > Not yet. > > > I'm trying to avoid setting CP_ERROR_FLAG here. > > Copied, how about using the same logic for node page as meta page, like > we did in f2fs_get_meta_page_retry()? Yeah.. let me send v3 and test a bit. Thanks~ :) > > Thanks, > > > > > > > > > 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) {