From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B25BECD98CE for ; Mon, 15 Jun 2026 22:08:03 +0000 (UTC) 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:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K4rGipOjLfBDJHU+8egtoz66+XFyRnhiQjGj5U6gpc8=; b=dzx4Z3vv89vYCniW+E7Ks6Est8 s2s/BD7yH6lbGCnzl5pFFV3H35DkiSMysLAKTmNn7dmz4WH0AulvrfCY8ZKrVN70Of05RjewdB2M0 CfuYO+Adc6YvCCOyha5QgZZPf01r0+zG9O/J7jnm2kgziEQAeCX2RDkKLX42/gwQTels=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wZFTM-0002FJ-NM; Mon, 15 Jun 2026 22:08:01 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wZFTL-0002FC-2y for linux-f2fs-devel@lists.sourceforge.net; Mon, 15 Jun 2026 22:07:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dMMzsQ1f0GS54dTClV0u+QjaNNDBUsBtvYGacLodqzA=; b=Ed01jXD864WnkR+NEOPEuPY09v o5o80lYM75Vc00FR0cUr0CShM9RHN/7N4HikdUhGeEGHgremak65X6dzjxf3i6J8cwnV//JDq/fiG K3+9Ry8Q87fE4y66IQ+D7uB3CvCLIWssQP7pTPwWU9c3tAiX7FjhI/wdWH5cfZLIU2o0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dMMzsQ1f0GS54dTClV0u+QjaNNDBUsBtvYGacLodqzA=; b=iIM2O/IDq38odq+CZ5PTVpM/da /nNy4EgEh0kweXzdxvdy1Fa65UTHXsxjyXBlVCZb0wustyiW8Tni6DOcoOTdwOHmC6igudr60QO+i fYqUi2S/slx/mkKGVsVphiZKzGxJ2QhRUnDFLLSDuQwnjO90Tm/p+ekrJmLQJXCTyKB8=; 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.95) id 1wZFTK-00063y-P6 for linux-f2fs-devel@lists.sourceforge.net; Mon, 15 Jun 2026 22:07:59 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 8C6446008A; Mon, 15 Jun 2026 22:07:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 189741F000E9; Mon, 15 Jun 2026 22:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781561273; bh=dMMzsQ1f0GS54dTClV0u+QjaNNDBUsBtvYGacLodqzA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=i1FkT+fa3h8P/EIy9sjR9u8xdb6Za1QtBp+RcuyFsGp3tJdAv5bqASn+yN5pgVcfX G7EbC6SsM5Mpp9Lwya1e6bLd5aZwUVCqvwsESJhuydw4xEN0COYE9bh2I9Xpo9DDEg RXyN1Njr5pEdPe5TvzjWjweaOOlu4T1Q4Evf7fY1rBrTflNIpGi6uLKY2AnhFZndbG bBUIEJ5FiatXgUIoj/GCN/8HSon68rvig0bTv0W+vQ9zLVVuHU24+VYM3r8a/TXx9m uXib5V1V+JW1oH+Ru7WLzFN6L1I2vAaYdhG99P38j2L5r5dJFUq0SFn7yjnrd02nSz 6tN5Drd32XzOQ== Date: Mon, 15 Jun 2026 22:07:51 +0000 To: Chunhai Guo Message-ID: References: <20260605100559.94843-1-guochunhai@vivo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260605100559.94843-1-guochunhai@vivo.com> X-Headers-End: 1wZFTK-00063y-P6 Subject: Re: [f2fs-dev] [PATCH] fsck.f2fs: drop unused SB_ENCODE_FLAG X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jaegeuk Kim via Linux-f2fs-devel Reply-To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 06/05, Chunhai Guo wrote: > Since commit 29c1e18a0bc5 ("fsck.f2fs: tune linear_lookup in > f2fs_do_mount()"), fsck_update_sb_flags() writes the superblock directly > and nothing sets c.invalid_sb with SB_ENCODE_FLAG anymore. Drop the dead > flag and simplify the SB_NEED_FIX check. What if the tool runs without that kernel change? > > BTW, SB_ENCODE_FLAG should originally have been 0x10, not 0x16, since > invalid_sb is a bitmask. > > Signed-off-by: Chunhai Guo > --- > fsck/fsck.c | 2 +- > include/f2fs_fs.h | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fsck/fsck.c b/fsck/fsck.c > index 4fca4dd7eb1b..85766118d04a 100644 > --- a/fsck/fsck.c > +++ b/fsck/fsck.c > @@ -4001,7 +4001,7 @@ int fsck_verify(struct f2fs_sb_info *sbi) > if (c.invalid_sb & SB_FS_ERRORS) > memset(sb->s_errors, 0, MAX_F2FS_ERRORS); > > - if (c.invalid_sb & (SB_NEED_FIX | SB_ENCODE_FLAG)) > + if (c.invalid_sb & SB_NEED_FIX) > update_superblock(sb, SB_MASK_ALL); > > /* to return FSCK_ERROR_CORRECTED */ > diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h > index 21310fa6a1af..07772da6e67d 100644 > --- a/include/f2fs_fs.h > +++ b/include/f2fs_fs.h > @@ -1477,9 +1477,8 @@ enum { > #define SB_ABNORMAL_STOP 0x2 /* s_stop_reason is set except shutdown */ > #define SB_FS_ERRORS 0x4 /* s_erros is set */ > #define SB_INVALID 0x8 /* sb is invalid */ > -#define SB_ENCODE_FLAG 0x16 /* encode_flag */ > #define SB_NEED_FIX (SB_ABNORMAL_STOP | SB_FS_ERRORS | \ > - SB_INVALID | SB_ENCODE_FLAG) > + SB_INVALID) > > #define MAX_CACHE_SUMS 8 > > -- > 2.34.1 > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A28113B71B6 for ; Mon, 15 Jun 2026 22:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781561274; cv=none; b=kTeVfM+AhshSsOZLWrRDlysmlmU/WqnCf33r0+Xq6F48fqyCe1oZGQ68683ZtuOUvnt3U6rSLciU5PKfTpuCLq6VewfMe5Yi5LGIg0nK6Ma5uWjppIDbsPMcJPHfDoWMkl3GXQlxqtu8yEu+OOdzEGa7E7pECha8LpAx4dGg7Fo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781561274; c=relaxed/simple; bh=D806EzI/aspuJ/PeXERinup8maAjXfbP2QutxiYRfkU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RNik4BMVQbDrSey2kXllaDQrfnSCn5CWbM6sTKSwOlBsM3MyuTC9JkqHhIDIKyrFF8xUBb0oNV+LaHt0RvsubS7yhDjeYu5v5MEdlYgLt1DpKJvhVoV0dugkNthx2EsQO7og9MxXsZwg0Ci5gfSC9A0YLvJtMdcsauqPdGEx3/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i1FkT+fa; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i1FkT+fa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 189741F000E9; Mon, 15 Jun 2026 22:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781561273; bh=dMMzsQ1f0GS54dTClV0u+QjaNNDBUsBtvYGacLodqzA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=i1FkT+fa3h8P/EIy9sjR9u8xdb6Za1QtBp+RcuyFsGp3tJdAv5bqASn+yN5pgVcfX G7EbC6SsM5Mpp9Lwya1e6bLd5aZwUVCqvwsESJhuydw4xEN0COYE9bh2I9Xpo9DDEg RXyN1Njr5pEdPe5TvzjWjweaOOlu4T1Q4Evf7fY1rBrTflNIpGi6uLKY2AnhFZndbG bBUIEJ5FiatXgUIoj/GCN/8HSon68rvig0bTv0W+vQ9zLVVuHU24+VYM3r8a/TXx9m uXib5V1V+JW1oH+Ru7WLzFN6L1I2vAaYdhG99P38j2L5r5dJFUq0SFn7yjnrd02nSz 6tN5Drd32XzOQ== Date: Mon, 15 Jun 2026 22:07:51 +0000 From: Jaegeuk Kim To: Chunhai Guo Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fsck.f2fs: drop unused SB_ENCODE_FLAG Message-ID: References: <20260605100559.94843-1-guochunhai@vivo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260605100559.94843-1-guochunhai@vivo.com> On 06/05, Chunhai Guo wrote: > Since commit 29c1e18a0bc5 ("fsck.f2fs: tune linear_lookup in > f2fs_do_mount()"), fsck_update_sb_flags() writes the superblock directly > and nothing sets c.invalid_sb with SB_ENCODE_FLAG anymore. Drop the dead > flag and simplify the SB_NEED_FIX check. What if the tool runs without that kernel change? > > BTW, SB_ENCODE_FLAG should originally have been 0x10, not 0x16, since > invalid_sb is a bitmask. > > Signed-off-by: Chunhai Guo > --- > fsck/fsck.c | 2 +- > include/f2fs_fs.h | 3 +-- > 2 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fsck/fsck.c b/fsck/fsck.c > index 4fca4dd7eb1b..85766118d04a 100644 > --- a/fsck/fsck.c > +++ b/fsck/fsck.c > @@ -4001,7 +4001,7 @@ int fsck_verify(struct f2fs_sb_info *sbi) > if (c.invalid_sb & SB_FS_ERRORS) > memset(sb->s_errors, 0, MAX_F2FS_ERRORS); > > - if (c.invalid_sb & (SB_NEED_FIX | SB_ENCODE_FLAG)) > + if (c.invalid_sb & SB_NEED_FIX) > update_superblock(sb, SB_MASK_ALL); > > /* to return FSCK_ERROR_CORRECTED */ > diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h > index 21310fa6a1af..07772da6e67d 100644 > --- a/include/f2fs_fs.h > +++ b/include/f2fs_fs.h > @@ -1477,9 +1477,8 @@ enum { > #define SB_ABNORMAL_STOP 0x2 /* s_stop_reason is set except shutdown */ > #define SB_FS_ERRORS 0x4 /* s_erros is set */ > #define SB_INVALID 0x8 /* sb is invalid */ > -#define SB_ENCODE_FLAG 0x16 /* encode_flag */ > #define SB_NEED_FIX (SB_ABNORMAL_STOP | SB_FS_ERRORS | \ > - SB_INVALID | SB_ENCODE_FLAG) > + SB_INVALID) > > #define MAX_CACHE_SUMS 8 > > -- > 2.34.1 >