Re: [PATCH -v3] ext4: simulate various I/O and checksum errors when reading metadata

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

 



On Dec 8, 2019, at 6:23 PM, Theodore Ts'o <tytso@xxxxxxx> wrote:
> 
> This allows us to test various error handling code paths
> 
> Previous-Version-Link: https://lore.kernel.org/r/20191204032335.7683-2-tytso@xxxxxxx
> Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
> ---
> 
> +
> +static inline bool ext4_simulate_fail(struct super_block *sb,
> +				     unsigned long code)
> +{
> +#ifdef CONFIG_EXT4_DEBUG
> +	struct ext4_sb_info *sbi = EXT4_SB(sb);
> +
> +	if (sbi->s_simulate_fail != code)

This should be marked unlikely(), as it is definitely one of the places
that is legitimately rarely true.  Sorry for not pointing this out on
the previous version of the patch.

Cheers, Andreas





Attachment: signature.asc
Description: Message signed with OpenPGP


[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