xfs
[Top] [All Lists]

Re: [PATCH 09/13] libxfs: remove ASSERT on ftype read from disk

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: [PATCH 09/13] libxfs: remove ASSERT on ftype read from disk
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 19 Mar 2015 12:46:43 -0400
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1426624395-8258-10-git-send-email-sandeen@xxxxxxxxxx>
References: <1426624395-8258-1-git-send-email-sandeen@xxxxxxxxxx> <1426624395-8258-10-git-send-email-sandeen@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Tue, Mar 17, 2015 at 03:33:11PM -0500, Eric Sandeen wrote:
> This one is already fixed in the kernel, with
>       fb04013 xfs: don't ASSERT on corrupt ftype
> but that kernel<->userspace merge is still pending.
> 
> In the meantime, just fix it as a one-off here, because ASSERTing
> on bad on-disk values when running xfs_repair is a very unfriendly
> thing to do.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---
>  include/xfs_da_format.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/xfs_da_format.h b/include/xfs_da_format.h
> index 89a1a21..695e698 100644
> --- a/include/xfs_da_format.h
> +++ b/include/xfs_da_format.h
> @@ -561,7 +561,7 @@ xfs_dir3_dirent_get_ftype(
>       if (xfs_sb_version_hasftype(&mp->m_sb)) {
>               __uint8_t       type = dep->name[dep->namelen];
>  
> -             ASSERT(type < XFS_DIR3_FT_MAX);
> +             //ASSERT(type < XFS_DIR3_FT_MAX);

Just delete it..?

Brian

>               if (type < XFS_DIR3_FT_MAX)
>                       return type;
>  
> -- 
> 1.7.1
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>