Re: [PATCH 2/2] btrfs: Add error string for EUCLEAN

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

 



On Sat, Apr 06, 2019 at 11:14:26AM +0800, Qu Wenruo wrote:
> Since we're going to support write time tree checker, it's possible that
> transaction get aborted due to tree-checker, also due to new
> BLK_STS_SELFTEST bit, we can distinguish real EIO error and EUCLEAN
> error.
> 
> Now add error string for EUCLEAN too.
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
> ---
>  fs/btrfs/super.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 120e4340792a..a4cbbd7861d3 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -86,6 +86,9 @@ const char *btrfs_decode_error(int errno)
>  	case -ENOENT:
>  		errstr = "No such entry";
>  		break;
> +	case -EUCLEAN:
> +		errstr = "Selftest failure";
> +		break;

EUCLEAN usually spits out "Structure needs cleaning" in userspace (and
ext4 & xfs have been using it for years to complain about corrupt data),
so why diverge here?

Wait... does "tree-checker" mean online metadata checking, and 'selftest
failure' is what gets spit out when it finds some metadata it doesn't
like?

--D

>  	}
>  
>  	return errstr;
> -- 
> 2.21.0
> 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux