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, From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C68B606A32C for ; Tue, 1 Dec 2026 08:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=lists.sourceforge.net header.i=@lists.sourceforge.net header.a=rsa-sha256 header.s=beta header.b=fL9OkW3v; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=sourceforge.net header.i=@sourceforge.net header.a=rsa-sha256 header.s=x header.b=GBOIjqtm; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=sf.net header.i=@sf.net header.a=rsa-sha256 header.s=x header.b=ML+Q4OGl; dkim=neutral header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Xt7n9OhB DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:References:To:MIME-Version:Date: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=h0/Quwx/dZ8KOrfpn97SEBtejEtNWCBhMzo4+ZnJB6A=; b=fL9OkW3vUo0P7F HycbaUJWEh8dv8jgyT+x3+GqDDIJc5cFyP6wSjjKPiLs6wOf01YNM5YR0YdcqLoDpP52hpI20CreC a/eap4uCbJ3J5eOhEaF/mtalcIb18SQJ7gzQerY2pylxxi5/LG69lsThw7/hqY+O9KY8lSb5MKqOV RpM=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.100.1) (envelope-from ) id 1xYIxU-000000004Oz-1DT0; Tue, 01 Dec 2026 08:11:28 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.100.1) (envelope-from ) id 1xYIxK-000000004On-2dE1 for linux-f2fs-devel@lists.sourceforge.net; Tue, 01 Dec 2026 08:11:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=989q9wQF3hgmd5bHZ55ICgj7kzHwY8+Dy7P+hsrB42w=; b=GBOIjqtmD4KOyIU3ppApNBrSBv 7L2dsT4W2ZvJxPmAY1jQKW1WC19hq/GfvLn1D6XgfJgJ7JBftLeyGQ/qnB1/4+sNPYh79cOYncbAE Jb9Ui84UyG+CEKu78Lfz0NlyHoWeTIn+Sp/JJ8z+0Bz1iqc/o0IrFxwOKSYIQMFUw7yc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=989q9wQF3hgmd5bHZ55ICgj7kzHwY8+Dy7P+hsrB42w=; b=ML+Q4OGloSOmfcYEWteJIWNAkS t3iiUEN1xZAlh/mwJu5XV2JxBzV75/ssNcFcvwa5HDkhygNdnohd1ChjXdxX/Eo4H9Kt+KxCmd/9M 4V8m/z3tIgcF964+bboeUt/2LvFhXn/FR/2ud4ZoTgVzakzJjis8clXUTnHHYgGeO7GQ=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xYIxJ-000000007nv-0ePo for linux-f2fs-devel@lists.sourceforge.net; Tue, 01 Dec 2026 08:11:18 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 717C361758; Tue, 1 Dec 2026 08:11:11 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Seongjae Jeong , jaegeuk@kernel.org References: <20261107061830.30764-1-jsjlee1020@gmail.com> Content-Language: en-US In-Reply-To: <20261107061830.30764-1-jsjlee1020@gmail.com> X-Spam-Score: -0.2 (/) X-Headers-End: 1xYIxJ-000000007nv-0ePo Subject: Re: [f2fs-dev] [PATCH v2] f2fs: skip further SIT updates for already invalidated blocks X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , From: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: linux-kernel@vger.kernel.org, yi.sun@unisoc.com, stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel