Re: [PATCH v2 5/5] ext4: add suppport to make bitmaps corruptions nonfatal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 29, 2018 at 08:45:17PM +0900, Wang Shilong wrote:
> +#define EXT4_MOUNT_BITMAPS_WARN		0x100000000 /* warn on bitmaps corruptions */
>  
>  /*
>   * Mount flags set either automatically (could not be set by mount option)
> @@ -1338,7 +1339,7 @@ struct ext4_sb_info {
>  	struct buffer_head * s_sbh;	/* Buffer containing the super block */
>  	struct ext4_super_block *s_es;	/* Pointer to the super block in the buffer */
>  	struct buffer_head **s_group_desc;
> -	unsigned int s_mount_opt;
> +	unsigned long long s_mount_opt;

I'd really rather *not* make s_mount_opt a long long.  64-bit
operations are slower (especially on 32-bit systems).  It would
probably be better to make it be more covenient to use s_mount_opt2
--- by adding a new mount options flag MOPT_2 which causes MOPT_SET
and MOPT_CLEAR to operate on s_mount_opt2, and then teaching
_ext4_show_options() to support mount options that are set in
s_mount_opt2.   And please do this in a separate commit and explain why
--- because we're running out of bits in s_mount_opt)


> +void save_error_info(struct super_block *sb, const char *func,
> +		     unsigned int line);

Please don't make a formerly static function visible in the global
namespace without adding an ext4_ prefix().

I don't think this is actually the right way to do things, actually.
If you're going to set the error_info, then it should be logged as an
EXT4-fs error.  What I would do instead is add an argument to
__ext4_error() that requests it to skip calling ext4_handle_error().

I think you will find that this will significantly reduce the size of
the patch and the number of lines added.

					- Ted



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux