kdevops.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: kdevops@lists.linux.dev, linux-xfs@vger.kernel.org
Subject: Re: [PATCH kdevops] xfs: add xfs/242 as failing on xfs_reflink_2k
Date: Wed, 17 Apr 2024 14:48:16 +1000	[thread overview]
Message-ID: <Zh9UkHEesvrpSQ7J@dread.disaster.area> (raw)
In-Reply-To: <20240416235108.3391394-1-mcgrof@kernel.org>

On Tue, Apr 16, 2024 at 04:51:08PM -0700, Luis Chamberlain wrote:
> This test is rather simple, and somehow we managed to capture a
> non-crash failure. The test was added to fstests via fstests commit
> 0c95fadc35c8e450 ("expand 252 with more corner case tests") which
> essentially does this:
> 
> +       $XFS_IO_PROG $xfs_io_opt -f -c "truncate $block_size" \
> +               -c "pwrite 0 $block_size" $sync_cmd \
> +               -c "$zero_cmd 128 128" \
> +               -c "$map_cmd -v" $testfile | $filter_cmd
> 
> The map_cmd in this case is: 'bmap -p'. So the test does:
> 
> a) truncates data to the block size
> b) sync
> c) zero-fills the the blocksize
> 
> The xfs_io bmap displays the block mapping for the current open file.
> Since our failed delta is:
> 
> -0: [0..7]: data
> +0: [0..7]: unwritten

That's most likely a _filter_bmap() issue, not a kernel code bug.

i.e. 'bmap -vp' output looks like:

EXT: FILE-OFFSET      BLOCK-RANGE            AG AG-OFFSET          TOTAL FLAGS
   0: [0..231]:        2076367680..2076367911 18 (6251328..6251559)   232 000000

and _filter_bmap has two separate regex matches against different
fields that both trigger "unwritten" output. The first check is
against field 5 which is actually the AG-OFFSET in this output, not
field 7 which is the FLAGS field.

Hence if the ag offset matches '/0[01][01][01][01]/' the filter will
emit 'unwritten' regardless of what the flags say it actually is.

-Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2024-04-17  4:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 23:51 [PATCH kdevops] xfs: add xfs/242 as failing on xfs_reflink_2k Luis Chamberlain
2024-04-17  0:37 ` Darrick J. Wong
2024-04-17  1:51   ` Luis Chamberlain
2024-04-17  4:48 ` Dave Chinner [this message]

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=Zh9UkHEesvrpSQ7J@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=kdevops@lists.linux.dev \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).