Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2886187rdb; Mon, 4 Dec 2023 10:04:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IH75iHKVOhJAwM9v0lUyb8NV/G9VBGL8LYCgQwBIzc5yZsISQh3YEWF099jcc+b/zhUDFIJ X-Received: by 2002:a17:90a:ad8b:b0:286:6cc0:cacc with SMTP id s11-20020a17090aad8b00b002866cc0caccmr3332341pjq.67.1701713080175; Mon, 04 Dec 2023 10:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701713080; cv=none; d=google.com; s=arc-20160816; b=u5B7m4UTfYE5sbOyLrd6k9XOLRww1DGOnGuua19raA1CK7lANdYXKVYb3gVaQcpaCx 260BTSUsUlGPjeELCL+qiBTYhCyZ3f48H/TJEw+O7SH4GiyRrSiX2rktaIC0pi8YfFPy 8inUTF+NVsVa7W+LK8JG8j9Egv8iEllERo3gSxgHD5VhsFpOnWVqgx24NgySiL1vgYrg rcalSv6FDl2b1jSZFedwAnI2DEqxXxT8Rd2E18hZ6TZYknUfqRqkGZxanFDmsoh5frQ8 vsxVhu3xXdb0n4L+9geN0IZp0UKC4VvUppr1f2A+vSix4mLmd7SH6tBthB16SxVRMD9N OtxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HG1CNJnpPUlkDrsPt6amTonclUxN4+/BtlTyq8ecSeU=; fh=rqHW7NazYv3wAmgqDKAbZUXWTmf0VaM5epB9R4zfTUE=; b=bxw61YwYl1pwQKL8AKPLs5tr/B+YwyOy23/KIgfUQ46UxXp8QQT8ogQsvYrPM5sNZy TePfZ2a0GFZBWLNprXFMWLowlw8JeAUohFoNkFOsRrkqyBR2H2li2Psn+yrmGQ0SuhrT /l3HXwv0/a8fYj7Hu5vgiKgjvTAfnkvt3dvyGfR3rq5eOi8ICamodAARJm4TUGugdqyf rzL0Ey4awbvmt8KBvc9eM4gtgNxIcYCgtO/ibMBV8aOxu6cPV6oRlxpHL32whM4b/v1M Wu4L+8Qsb4Hx6W9vYSGT9zKfF6fg6HBXFOaGeN6DaKEtKY9wQI2U8zo/0U0MgEC09HMR 7ETg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Px+gBEtB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d1-20020a17090a8d8100b002868676a569si3384876pjo.18.2023.12.04.10.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 10:04:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Px+gBEtB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1EB3F80AC59B; Mon, 4 Dec 2023 10:04:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231400AbjLDSE0 (ORCPT + 99 others); Mon, 4 Dec 2023 13:04:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjLDSEZ (ORCPT ); Mon, 4 Dec 2023 13:04:25 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310F5B4 for ; Mon, 4 Dec 2023 10:04:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0FCCC433C7; Mon, 4 Dec 2023 18:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701713071; bh=5uILUttJEnB7yuvoHAjCIDDFlCw2Yu+1VyECoAyrkIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Px+gBEtB5gOIxbUSaHIJWKJfoWuoWSWnf7cNY1RJkYdRobSfs0sVl4iE/qxgEtBeC 5EkByepKhfdqd782afxg8sn7qQ9SgjZqXqgTD1CmLpXx5NyNMIINjUeXi16A6M1Qud S2t0nAjbzFCinfGqKkxBKhqXqWMKZfmG0lBUkIl+zn7TK5Y0kddtUEukKPNSgRDwu1 C1XqibzWN3PfcchsBmRftLKw51hSZMR8IwVhMNlSjq0l++nP9xOGm3IMwqrI8j9dj4 Y1htIwkHuZKcIZToWAm1OTPtzVntKrS5hS1ol1m/eIpqrBo8bnZUXlfmCty/tS+wVj E1rYcTfM4OFBQ== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 2/4] f2fs: fix write pointers on zoned device after roll forward Date: Mon, 4 Dec 2023 10:04:26 -0800 Message-ID: <20231204180428.925779-2-jaegeuk@kernel.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231204180428.925779-1-jaegeuk@kernel.org> References: <20231204180428.925779-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 10:04:37 -0800 (PST) 1. do roll forward recovery 2. update current segments pointers 3. fix the entire zones' write pointers 4. do checkpoint Signed-off-by: Jaegeuk Kim --- fs/f2fs/recovery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 16415c770b45..d0f24ccbd1ac 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -917,6 +917,8 @@ int f2fs_recover_fsync_data(struct f2fs_sb_info *sbi, bool check_only) if (!err && fix_curseg_write_pointer && !f2fs_readonly(sbi->sb) && f2fs_sb_has_blkzoned(sbi)) { err = f2fs_fix_curseg_write_pointer(sbi); + if (!err) + err = f2fs_check_write_pointer(sbi); ret = err; } -- 2.43.0.rc2.451.g8631bc7472-goog