public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH] xfs/278: mkfs with v4 format
Date: Thu, 22 Mar 2018 13:26:44 -0700	[thread overview]
Message-ID: <20180322202644.GE4810@magnolia> (raw)
In-Reply-To: <bde6f5a1-1107-9c03-402d-486bfbdcbd35@redhat.com>


> > parsing error
> > field u not found
> > parsing error
> 
> ...
> 
> Switch back to the original behavior by turning off crcs,
> and catch such failures if they crop up again by looking
> for xfs_db errors in $seqres.full.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> (is it horrific to grep $seqres.full?  xfs_db doesn't exit
> with failure in this case :( )
> 
> and now this causes repair to fail on a verifier error, but
> I just sent an xfsprogs patch to fix that as well.
> 
> diff --git a/tests/xfs/278 b/tests/xfs/278
> index b94ee9c..c0e09c7 100755
> --- a/tests/xfs/278
> +++ b/tests/xfs/278
> @@ -48,7 +48,7 @@ _supported_os Linux
>  _require_scratch
>  
>  rm -f $seqres.full
> -_scratch_mkfs >$seqres.full 2>&1
> +_scratch_mkfs -m crc=0 -n ftype=0 >$seqres.full 2>&1

This is still a problem on v5 filesystems, isn't it?

>  _scratch_mount
>  
>  mkdir -p $SCRATCH_MNT/dir/subdir
> @@ -73,6 +73,8 @@ _scratch_xfs_db -x -c "inode $DIR_INO" -c "write core.nlinkv2 0"  >> $seqres.ful
>  _scratch_xfs_db -x -c "inode $SUBDIR_INO" -c "write u.sfdir2.hdr.parent.i4 0"  >> $seqres.full

So I think the problem here is that between v4 and v5 the field names
changed slightly?

u.sfdir2.hdr.parent.i4 vs. u3.sfdir3.hdr.parent.i4?

So we ought to be able to _scratch_xfs_get_metadata_field to see if the
v4 field name exists, then _scratch_xfs_set_metadata_field with the
appropriate name to set the field?

ino_loc="inode $SUBDIR_INO"
if [ -n "$(_scratch_xfs_get_metadata_field "u.sfdir2.hdr.parent.i4" "$ino_loc" ]; then
	_scratch_xfs_set_metadata_field "u.sfdir2.hdr.parent.i4" 0 "$ino_loc"
else
	_scratch_xfs_set_metadata_field "u3.sfdir3.hdr.parent.i4" 0 "$ino_loc"
fi

Or something like that.

--D

>  _scratch_xfs_db -x -c "inode $SUBDIR_INO" -c "write core.nlinkv2 0"  >> $seqres.full
>  
> +grep -q "not found\|parsing error" $seqres.full && _fail "xfs_db commands failed"
> +
>  echo "===== BEGIN of xfs_repair =====" >> $seqres.full
>  echo "" >>$seqres.full
>  
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-03-22 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 20:09 [PATCH] xfs/278: mkfs with v4 format Eric Sandeen
2018-03-22 20:26 ` Darrick J. Wong [this message]
2018-03-22 20:37   ` Eric Sandeen
2018-03-23  2:16 ` Eryu Guan
2018-03-23 16:49   ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180322202644.GE4810@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox