From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796112671; b=CauiaHfvvTFmbw7pHIm7TaiW7zJhSzQm3hxv8EEr3+uuSK+UwDe8Y2CMM+IiXx2EtKVl lJbZRhQsNmX6Vmvn2fgOO+rDn63Q1pHthyrSVcN5KvXhjA6h+kZeaCQd9grlu9qxg9PBt xqCCoCpa2psI5HFGo0REVyiv4o45XcpCyfq98teyR2/JmJuaYWEwL0GR9J3N/VulZIAN8 4BRyb5xr9+i3d14ecJJlkSasRAyXyo080R2MxMOPJJfsB6f6LBFGJjCdS4PuQVL2h8y8Y ee0BMlBO6gka50vo/sedIYZIw+0wwHb+kH86putUTHu2p8461OdI9hNdWQJ9Kz+s2dQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796112671; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:Cc: Subject:To:References:Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=989q9wQF3hgmd5bHZ55ICgj7kzHwY8+Dy7P+hsrB42w=; b=hNArxGQJkInk2xP0YXkBhC5NXRCIgtExFtImYKu0Qum9JxkEiGm2zFNFtuQzUx1qAfRZ ezBx+d7V7PmA2QVFgQZlOHZ1jxjAqiOR3mCZY4SpeD6YDu1bZIrpvSk4yBnLZ4pzPo0jl BpkLJ4mL5PX+7Wa7R3LjMWoTkckT1kmntRp3Q5pSMZvMVSD2hTQ0Jvp/BAmo/r7Qltx0X E1X9MbPFSBd/ZGgANsPfd6ONSyUfvOnVJg2FYbUTvH9XaM6RBewPRhnVwbNYghYVUk717 nO76pYtWdD9H6zSYLlLB4F5fIMnu7FITnHG3AB7J1cBjR2r9qpao0jPK0wSVBXHw4Mw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Xt7n9OhB; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88803606A31A; Tue, 1 Dec 2026 08:11:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Xt7n9OhB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 156471F00897; Tue, 1 Dec 2026 08:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796112671; bh=989q9wQF3hgmd5bHZ55ICgj7kzHwY8+Dy7P+hsrB42w=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=Xt7n9OhBBXIKa9ompAUR0GRhqqJ/oyDKNxL4t62aPMOspjNrmfFG4REE6feKc99NB qmy+824HduUMe5d/4u07flvtc2Fv0G2eXyFFFkCM/cKaBnE755P2OU/w3ITSv+p/sx 9CCU23s6BY0ax5IndsB+HHNaCGeW7lwwzO8dtlApKjVdumQj2PFEiBPWew3uavpmjf IO8HEQYkubDnBAazVnlzTQtI23xN+edCjcSneYkFg+0Iu/gsj7wSdud9uMZh6m8bQf Xm5yB4BBhB7EP0OEt2UJ6RFVGHxkY7gauwQpthLmtx9FAMqf3hiYU5XZHvrLZKNPBU Dqksvy9a4qsrw== Message-ID: Date: Tue, 1 Dec 2026 16:11:08 +0800 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, yi.sun@unisoc.com, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] f2fs: skip further SIT updates for already invalidated blocks To: Seongjae Jeong , jaegeuk@kernel.org References: <20261107061830.30764-1-jsjlee1020@gmail.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20261107061830.30764-1-jsjlee1020@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/7/26 14:18, Seongjae Jeong wrote: > When update_sit_entry_for_release() encounters a block whose bit is > already cleared in cur_valid_map, it reports the inconsistency and > corrects se->valid_blocks and del. However, it still proceeds with > the discard bitmap and checkpoint accounting updates. > > This can clear the discard bit unnecessarily and incorrectly decrement > the segment and section ckpt_valid_blocks counters when the block is > not marked in ckpt_valid_map. > > Continue to the next block after correcting se->valid_blocks and del, > so that an already invalidated block does not trigger further discard > bitmap or checkpoint counter updates. > > Cc: stable@vger.kernel.org > Fixes: 81ffbd224e5f ("f2fs: update_sit_entry_for_release() supports consecutive blocks.") > Fixes: a66cdd985532 ("f2fs: introduce discard_map for f2fs_trim_fs") Should use Fixes: 81ffbd224e5f ("f2fs: update_sit_entry_for_release() supports consecutive blocks.") instead of above two Fixes lines as discussed w/ Seongjae in https://lore.kernel.org/linux-f2fs-devel/CAPHXVrx8AESeQdo+nsnHZsBaJ4=_t00cqaT6G1TGh-JLN_pHog@mail.gmail.com > Signed-off-by: Seongjae Jeong Reviewed-by: Chao Yu Thanks,