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 >