Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1639714rbb; Mon, 26 Feb 2024 17:01:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUGdmA06pZNFeuBKsH1NqyFzJub1F7QS33+arb991tBxkXxh1tziQf7qIlng97eLfJoocU7tCmAQlxSGaALUa4OGBe24AqatE+hTrv54w== X-Google-Smtp-Source: AGHT+IHDsRyeoxfqfTMTvfFnQVj+ELQoGnrZWiovYjGOVsd1HvsZxLAK9jUYlLMYhwjnadPz1+EJ X-Received: by 2002:a05:6358:249a:b0:17b:786a:6cef with SMTP id m26-20020a056358249a00b0017b786a6cefmr9435166rwc.13.1708995691534; Mon, 26 Feb 2024 17:01:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708995691; cv=pass; d=google.com; s=arc-20160816; b=MtIIpGQGWTfGvA0bi4JExrHkJLXsaqM+CtLDAeqJpcf6Weo6WGH+JvctxUrdYHTmWX gzR1SLoVXSkL7bBA2hfrmQ9VRi+v+Fya51HNTxM9L/NyZ8wGPd48EOb0ZLf/h2SYJ4e0 u26eJxozfIbZvgR6kMuwLOTtgc6v6pcC+HwhtmbyJEGjhSC+HFeYsPkmgtVcH2D+VgF+ TY//E8+umMGv4wDSXCG0UTJSaiHo0rpi2E6v3oUdwftwty3fcGxy+2lQcksuY16S1Xrz 7eP8TEoqlwmXX8KM6DEEDfFpETAf9EJILXF1iTFY4mL2Tf2+aocO1hjgCHG84pjtJW5O SYDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jpJE0OCTSHvA3MT6lcfCkT+G69/vthN8Ji3SAz3g+YM=; fh=KuS+1UlV5gqHbJ37XPD8MCZ1v8KBm0nhjTGQI/haxiI=; b=c5di7tNlrpgXUH5f+2g6qs1/N01xF/FlCPLoF/I1s1s0mpl7rheCFxSxx0ikMVP5nY Uj80a7IeIzCQJ1g3s8B3vI4erQqsD4GD/xDBTpupXYjOBpu+XMWVKuoaAtt/ZFzPobKf 3i+b68fZ6NxvDti948aRrCAe9QKmZOd6ORVvSzQKXh3hRYX8S9qOHjm0hdkHuSCPpjoF 5uU8t+BOIS4F/FXUtph5NrmC/URuZkl3I60brmOGZaYjvqEm04LRoiJtAwfHIceBDhxd yGbJcM/tQza/ekdqFE8v4Fn0r1zgkapoGarE3fTG4GMNlkUVd6TxEQLC3yrh3JQqwAIV Jvmg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uRpQawtR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82499-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j10-20020a63550a000000b005dc47dd5dccsi4536100pgb.893.2024.02.26.17.01.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 17:01:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82499-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uRpQawtR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-82499-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82499-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EB09A286B6E for ; Tue, 27 Feb 2024 01:00:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 361324A1E; Tue, 27 Feb 2024 01:00:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uRpQawtR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64FB61FA6 for ; Tue, 27 Feb 2024 01:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708995639; cv=none; b=aJPdSGuMzvn8FVMB1f3mJI0SErTLuQCiPvtgi8OI/iBn9z4bdE+8j5M/8uZkcFfMisJQE+c4Bk4z1L9QMDu+5fVBiWRt/nEasFFWFLlmSbK7FJ8hNL4HNu6H6jwL62QpGIQSoz6cOvBqZg1xoNFQI/byr8tGkbMfUORuR8QH/7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708995639; c=relaxed/simple; bh=rns9tbOCnQ17z7ThR0yXP5WAZXibD6njSBg/+AoGdPQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WFN/WLmcipRS7+gQ5DJ9m0geBzmbRhUHCn9fZi7gYL/jhz+4SsPHmG1zWaINhHTbM0qHtzO320EJrdMccXX9vG8/1eXTESQwDlnVS4hq8PrzB3NlclcIeCLbL2eHMr2my8BTKmtUUOZs+GZ1z3eHMzWalF/ZAqjRvZPf3kEBEAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uRpQawtR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C750CC433C7; Tue, 27 Feb 2024 01:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708995638; bh=rns9tbOCnQ17z7ThR0yXP5WAZXibD6njSBg/+AoGdPQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uRpQawtR6DPv/3KJNMTcCRb3IeSI+I+G5VAD7KM+HG2ylj5YIJR3nb+1De2dsfT5E FilDgb2KF0FDmdjQGcmuA3HUkv1NtSoRw5GZJJi48hZq4GvyrFDXxulwGPTzI7pYyW 09ClKZVEoIJZGtgT5HNNGlq8oaoGOcLJo6TPTi+AF+j0jxZgoDnpcxGucauPbOMOjC koxfYHatvKTixDwO2Y7mUeM9Ipl6EyoW6nU4F95+xj4i/iQ0HCTC8oaIgOQQL1IeLi 54PScHjs366BJUdOuSNBnaHKeJlWSDLbBRvjjmzfX/woBFp8gO8mVcfT8luxKbUgTp J9OndJDidkCMg== Date: Mon, 26 Feb 2024 17:00:37 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH 2/5] f2fs: fix write pointers all the time Message-ID: References: <20240223205535.307307-1-jaegeuk@kernel.org> <20240223205535.307307-2-jaegeuk@kernel.org> <68e95cb8-9bf5-4849-befc-bbbe8becfd68@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68e95cb8-9bf5-4849-befc-bbbe8becfd68@kernel.org> On 02/26, Chao Yu wrote: > On 2024/2/24 4:55, Jaegeuk Kim wrote: > > Even if the roll forward recovery stopped due to any error, we have to fix > > the write pointers in order to mount the disk from the previous checkpoint. > > Jaegeuk, > > IIUC, we may lost warm node chain once we allocate new section for all logs, > should we give some notification in log to indicate such condition that > filesystem doesn't process a full recovery flow? How about v2 to preserve the error which gives a warnings on roll-forward recovery? > > Thanks, > > > > > Signed-off-by: Jaegeuk Kim > > --- > > fs/f2fs/recovery.c | 2 +- > > fs/f2fs/super.c | 2 +- > > 2 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c > > index b3baec666afe..8bbecb5f9323 100644 > > --- a/fs/f2fs/recovery.c > > +++ b/fs/f2fs/recovery.c > > @@ -913,7 +913,7 @@ int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only) > > * and the f2fs is not read only, check and fix zoned block devices' > > * write pointer consistency. > > */ > > - if (!err && fix_curseg_write_pointer && !f2fs_readonly(sbi->sb) && > > + if (fix_curseg_write_pointer && !f2fs_readonly(sbi->sb) && > > f2fs_sb_has_blkzoned(sbi)) { > > err = f2fs_fix_curseg_write_pointer(sbi); > > if (!err) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > > index 2e41142d07c0..4d03ce1109ad 100644 > > --- a/fs/f2fs/super.c > > +++ b/fs/f2fs/super.c > > @@ -4673,7 +4673,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) > > * If the f2fs is not readonly and fsync data recovery succeeds, > > * check zoned block devices' write pointer consistency. > > */ > > - if (!err && !f2fs_readonly(sb) && f2fs_sb_has_blkzoned(sbi)) { > > + if (!f2fs_readonly(sb) && f2fs_sb_has_blkzoned(sbi)) { > > err = f2fs_check_write_pointer(sbi); > > if (err) > > goto free_meta;