Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp395788rdb; Mon, 22 Jan 2024 07:31:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFx5q5iVvM5KQ5GZD18kQ8pCEpmz8NfB6itjSV68l0z/m0PoMCN6QXpRSmHMRJSoAmNQF0U X-Received: by 2002:a17:90b:606:b0:290:11b6:2cef with SMTP id gb6-20020a17090b060600b0029011b62cefmr1317272pjb.94.1705937515190; Mon, 22 Jan 2024 07:31:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705937515; cv=pass; d=google.com; s=arc-20160816; b=F8Bnxc1aK0hi2/ZNiJ2TxPSJv3r4WTnnbGRUe00p8B8XUC+YNHNQW+oGBrO1r4dvv9 ebnryuhZcjZVy9iWMPxiTAEchfsdht7Um8GRXUrpWl3y9Qv7Hcx5BALXGIiBDeBx56rL DhMk0fn+J7mGtGFmsgBtqiDX0XsG3+ktkhq+j5q1O5HU1W+R5ryhBonEsRuJGEWhodRQ iPv+Y3FQB/pc6CCDDFxq/m0osC9D20GFPKcTUehyzUJLLY7rEA+tLBXU6lLMqjWJLA3P 9vB2tdkRJUrwufmGPriS0ZVzpYha8M3tJQPHy6iPvGKYV70rCtfYZ+iBTgyMPVSBLWyG rnWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=qPwFWKYaMuHMff7buFv1bxCGiw4UNdHY7IG0sAlOfOc=; fh=uDU8zh5U3mgzCkqgOpJH74q5XWE2PRLD9R6lBZ5Lg7w=; b=Q3QGOP4JONnqvmj9ovRtU+07swlWpobk3jBCbfb7N1L+5RhBD+KTPoi4iTHf+BMFiF PD+vlguPYTE9dSl2S+qWkuOpO4PKYpIgcFF4H5HJAW2i4gvccFrKpHUVJ9cT3RA1PeAV XYbRVMFYpB41h1ZRsQApfe7/Uv54nFev+WHL8y6AA9Pvc5GAxXF91IKvgnHOwvhAshyA 9Ga9ZeavRx+Y89d7Da1VGjvcshtsMdYKgCJY+6z/aeZHqvZWI8YzXseQ/A74fOSHWtkf YJGY1a12dZRZsZlaeNwGbChGNWBtPRXbeb2i5SV8Y3yQPh/pRqOk+eo15vzqhSZ9YoV3 frFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ca1/d30I"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33229-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id m11-20020a17090a730b00b0028e6fc4d476si8075609pjk.106.2024.01.22.07.31.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:31:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ca1/d30I"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-33229-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33229-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B4439B2B74F for ; Mon, 22 Jan 2024 15:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 445E24B5AE; Mon, 22 Jan 2024 14:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ca1/d30I" 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 670D83DB95; Mon, 22 Jan 2024 14:56:50 +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=1705935410; cv=none; b=s4k37OMPDr0t7v8AftvKF5uARF80brEqI0Dip5D1UoVu87BWIwtmv+uWT1nhRQ4Qx+EVL4D8nnrxR4gL+OnUASLRmV2w5GD6jhkmFGYvzVoie2lMcQD0xjn64l5v4s6XVv12cZVoaxKHbyDYyWPz4cPnCdO1qtMUt35tJMUSGhs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705935410; c=relaxed/simple; bh=y0weoZjaAER4fd5JnbyUGnSm+FqzRTJnMMaHVtDIdJ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fHknBD9QnHjfwdv3hia/rw/K5V0OBh3GOcEWXldhL/qFfBQO9QXjHyGHejKQrJv8LDD9ebCnSD03POQk7wbDjEhpAVUQOPUvqeU0UO/cOwI4P5drG4UE9PkCP1LwUDboM3lPqCsp8vv86UTsNHcjXyT8cvC3CthYD2p16Kxrn6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ca1/d30I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A20DC43394; Mon, 22 Jan 2024 14:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705935410; bh=y0weoZjaAER4fd5JnbyUGnSm+FqzRTJnMMaHVtDIdJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ca1/d30IXwJm8hnvYz4SP9L6ZlokwJGouNJT0AdxfnI+ijapMOuef9bTRIprv101f RUU15R0fsM8ZnAL4zWZmbrXbCp4nTrSiBCrYSoAutI7bbr7mtmmtIVzxTt5AMAUhxC hhAHcX8acCMJUrF498LBGV7gYtMXWTFRhZeK3yWS91+ULVhPKiGOZq4uKVoMb+EndQ BwNXRpU5+NClPasraCO8a0V258TbzyeuU/3UywguBSkovLGq7wA4P6qeTVw31MGlMF N1+qOxOT1iv5lZayRI6WlT0Ft7LatGk65aDz9dIzxoUjYLhbVq9cRTcjewVCdpHWya +HbIMOtZJ81dw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jaegeuk Kim , Daeho Jeong , Sasha Levin , chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH AUTOSEL 6.7 15/88] f2fs: fix write pointers on zoned device after roll forward Date: Mon, 22 Jan 2024 09:50:48 -0500 Message-ID: <20240122145608.990137-15-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122145608.990137-1-sashal@kernel.org> References: <20240122145608.990137-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.7.1 Content-Transfer-Encoding: 8bit From: Jaegeuk Kim [ Upstream commit 9dad4d964291295ef48243d4e03972b85138bc9f ] 1. do roll forward recovery 2. update current segments pointers 3. fix the entire zones' write pointers 4. do checkpoint Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- 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