Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1072977rbb; Sun, 25 Feb 2024 18:48:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOyVCSnLRGIL9OGpVX3QdgEx4CSOH7s2DQiHn5sD+gZk0phUVx3UUGeoGhOs0INUv97t7RH7ZnXux9fc/0BQ1gLDUM0aSwTMWpItt5tA== X-Google-Smtp-Source: AGHT+IH9eqW1yuWfs2Kvp5ALECVWVROgdCWw2h0tKo7WSul1XsHZYq0fWVkAUR8NBdNKCBOtGvP9 X-Received: by 2002:a17:906:64b:b0:a3f:bcff:18b8 with SMTP id t11-20020a170906064b00b00a3fbcff18b8mr3713930ejb.27.1708915691990; Sun, 25 Feb 2024 18:48:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708915691; cv=pass; d=google.com; s=arc-20160816; b=RUfEupnSV4AldvAbNMBfc+Qo+xyBpaG5e9bLQBuOXzcEfez6p3QXvTKvoBmAqXe4iU mDYAhWmN09WodfoQqu4FTZOeeuNxcQ2ttjnVAuL0JsSfi7IfbjN8W2E4SJpO54Ysu3/U kPYOe4O16au3uzHuPLZ2iDL2PxTTBoUQrRAPjJMCr2yQ8wvtKb9ZZzMfcrAjVRkYAYZU S+XPfjw9fZ1Umru1qM/0b/lUsOPNUH5wb/dBntZpFCmzF6hSmqXi+4h4lXqHJGSzsZK9 LuqfSnWnku+kxRnMJIcPN4Ostfw3VFbm1/EbzrN1JSeni3gO5DiJKWzm+A1l7eZCkc0e Lukg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=aavc5Go64T4ueDMoUUFRhsNpRWuJfJrhPTx9cEh4Ih8=; fh=PHq4OuhOUUP7V1I+gDdMCZNzaT4vH9shSoLBu78e8bA=; b=UkVAFKzQWfBJtwmIabrkuBBxy8RLR11xJnCIYL0YWRNTGsaLRqns6s1NgRHGu0rCr8 xbTTRJ53hKW4J8ONXMRmoETSd2sKJTI9j6M/bwiB2uTPvND3bYJJMH1vC01W9CqFimx0 OFBOHzhJ5ggyUsqWBczo+VUY056uBEC7ofH6D/UScUHh1Fv53BxAaXPd0H+JBTtz2zo6 R3ta9k+vGPNacIxh7AbNtWP8wq6Jmbf387m5uKistEyn4op0k7xOw/AU2uEy14MGQVCc TVaJCnT1XGPWkI2uJXklWe+GdxAZ74+tSH6ofbL63Z0pBda9gPis1+HroXpgVz5iatO4 YfMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJwuEg+Y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80421-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qa18-20020a170907869200b00a3f779a7ba7si1734348ejc.485.2024.02.25.18.48.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:48:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mJwuEg+Y; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80421-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80421-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A3BC81F216F5 for ; Mon, 26 Feb 2024 02:48:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 609A5FBE8; Mon, 26 Feb 2024 02:48:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mJwuEg+Y" 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 82CD6EAC2 for ; Mon, 26 Feb 2024 02:48:05 +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=1708915685; cv=none; b=X7dRg+q9oQXfLkgewJVxlJMPbbw2B5L5LVcqbttXM5+9h7oJp8v15bEo5luIFLG2Q60YB4H8vsXEXK7otZi74SOiFrfrQJZMJ7H2o3LDdurmzYcO1Ix+pJW5Ri4apSIFuiBfxN+6rrRMEzn/0lq06Gnhcd3UZXGQuBwyLB9RzHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708915685; c=relaxed/simple; bh=UyE9kqRHnjuu/JVrTs6boGbg+Y9Veu3Y0uj4/okwmiw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=H45dyO1OFU6n0geYdRVpC2Wgg8FjDkmg6N+EypHNzOD1rKtiqZjJHy0vIofnT/shxTCqp57PIJRBaIO4EmirJJfz6K3mGHRRTiUfjPU97CAn4amFY8Y4jjXSEPDZLzwLaVbPuh4RCAeFJaSo2scQRFVCXv3LgtZcYA3G2Wi8y6k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mJwuEg+Y; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FF6AC433C7; Mon, 26 Feb 2024 02:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708915685; bh=UyE9kqRHnjuu/JVrTs6boGbg+Y9Veu3Y0uj4/okwmiw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=mJwuEg+Y6GCM5bXijENcg5aLRgP20JTqgfG9ShYPXs1+0wDyxpwtrtWm9A/T2hxo+ VilpbGXIyPKEZ9uzUkWrlj6wLK75I+E5QtyHdgJcHJ021rz/W2BtLBHJyN8efuUjUh gDuhb1Icg+kXLSlclOaMsAdKJOFehfaIw38TXnmvQddPdCrqtVPpk4F1Yz0ke49Giu 46+mBmv0/GonV+6YdU7qYGdnLD7gyWg1SZz/g71t1XnTJYg+C0dLnejXZcz3Nuo1lG MNPh7yt/cfacDXPSk0GLjf//xpBl3cS/yC1JAsM5dBj/T689RdnByA8P0BoA3HaZ9+ ibq4AI+ZQfZyg== Message-ID: <68e95cb8-9bf5-4849-befc-bbbe8becfd68@kernel.org> Date: Mon, 26 Feb 2024 10:48:01 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [f2fs-dev] [PATCH 2/5] f2fs: fix write pointers all the time Content-Language: en-US To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net References: <20240223205535.307307-1-jaegeuk@kernel.org> <20240223205535.307307-2-jaegeuk@kernel.org> From: Chao Yu In-Reply-To: <20240223205535.307307-2-jaegeuk@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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? 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;