lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Aug 2021 13:36:07 -0700
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Yangtao Li <frank.li@...o.com>
Cc:     chao@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] f2fs: warn on when fsck flag is set

On 08/11, Yangtao Li wrote:
> SBI_NEED_FSCK is an indicator that fsck.f2fs needs to be triggered,
> this flag is set in too many places. For some scenes that are not very
> reproducible, adding stack information will help locate the problem.

Can we add an error history and expose it in sysfs?

> 
> Signed-off-by: Yangtao Li <frank.li@...o.com>
> ---
> v3:
> -Remove extra parentheses
> v2:
> -Convert to WARN_ON
> -One more blank
>  fs/f2fs/f2fs.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 67faa43cc141..0d08e31214a3 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -33,7 +33,7 @@
>  #else
>  #define f2fs_bug_on(sbi, condition)					\
>  	do {								\
> -		if (WARN_ON(condition))					\
> +		if (condition)						\
>  			set_sbi_flag(sbi, SBI_NEED_FSCK);		\
>  	} while (0)
>  #endif
> @@ -1999,6 +1999,8 @@ static inline bool is_sbi_flag_set(struct f2fs_sb_info *sbi, unsigned int type)
>  
>  static inline void set_sbi_flag(struct f2fs_sb_info *sbi, unsigned int type)
>  {
> +	WARN_ON(type ==  SBI_NEED_FSCK);
> +
>  	set_bit(type, &sbi->s_flag);
>  }
>  
> -- 
> 2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ