All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Zorro Lang <zlang@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] xfs/131: test iomap zero range via fsx and error tag
Date: Mon, 11 Aug 2025 15:19:40 -0400	[thread overview]
Message-ID: <aJpCTGS3bdYkVP2n@bfoster> (raw)
In-Reply-To: <20250811181908.xmzp5wpqg5w3tgyb@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>

On Tue, Aug 12, 2025 at 02:19:08AM +0800, Zorro Lang wrote:
> On Thu, Aug 07, 2025 at 10:56:26AM -0400, Brian Foster wrote:
> > iomap supports a zero range operation based on buffered writes. This
> > mechanism is used in limited spots, such as partial block zeroing,
> > etc., because usually for larger zeroing ops it is more efficient to
> > punch a hole and allocate unwritten extents.
> > 
> > This means iomap zero range has limited production test coverage
> > even though it has some particular corner cases that warrant test
> > coverage. XFS supports an error injection knob to force use of iomap
> > zero range on fallocate zero range operations. Add a test to run fsx
> > with this knob enabled to provide more zeroing test coverage.
> > 
> > Signed-off-by: Brian Foster <bfoster@redhat.com>
> > ---
> > 
> > FYI, this test is intended to go along with this patch[1] that
> > introduces the errortag.
> > 
> > [1] https://lore.kernel.org/linux-fsdevel/20250807144711.564137-8-bfoster@redhat.com/
> > 
> >  tests/xfs/131     | 26 ++++++++++++++++++++++++++
> >  tests/xfs/131.out |  2 ++
> >  2 files changed, 28 insertions(+)
> >  create mode 100755 tests/xfs/131
> >  create mode 100644 tests/xfs/131.out
> > 
> > diff --git a/tests/xfs/131 b/tests/xfs/131
> > new file mode 100755
> > index 00000000..eb8882a3
> > --- /dev/null
> > +++ b/tests/xfs/131
> > @@ -0,0 +1,26 @@
> > +#! /bin/bash
> > +# SPDX-License-Identifier: GPL-2.0
> > +# Copyright (c) 2025 Red Hat, Inc..  All Rights Reserved.
> > +#
> > +# FS QA Test 131
> > +#
> > +# Run fsx with XFS force_zero_range error injection enabled. This is a proxy
> > +# test for iomap zero range. Zero range is used in limited cases by default,
> > +# such as EOF zeroing on file extension, etc. This error tag forces use of iomap
> > +# zero range for fallocate zero range operations.
> > +#
> > +. ./common/preamble
> > +_begin_fstest auto quick zero
> > +
> > +# Import common functions.
> > +. ./common/inject
> > +
> > +# Modify as appropriate.
> > +_require_test
> > +_require_xfs_io_error_injection "force_zero_range"
> > +
> > +_test_inject_error "force_zero_range"
> > +run_fsx "-q -S 0 -N 100000"
> 
> Just check with you, if you hope to have a $TIME_FACTOR with -N at here.
> 

So do you just mean to make it 100000 * $TIME_FACTOR so the runtime can
be increased via configuration, if desired? If so, that sounds
reasonable to me (same for your tweak in the other email as well).

> This test case looks good to me with this patch:
> https://lore.kernel.org/linux-xfs/20250807144711.564137-8-bfoster@redhat.com/
> 
> Reviewed-by: Zorro Lang <zlang@redhat.com>
> 

Thanks!

Brian

> > +
> > +# success, all done
> > +_exit 0
> > diff --git a/tests/xfs/131.out b/tests/xfs/131.out
> > new file mode 100644
> > index 00000000..2ca0d932
> > --- /dev/null
> > +++ b/tests/xfs/131.out
> > @@ -0,0 +1,2 @@
> > +QA output created by 131
> > +fsx -q -S 0 -N 100000
> > -- 
> > 2.50.1
> > 
> > 
> 


  reply	other threads:[~2025-08-11 19:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-07 14:56 [PATCH] xfs/131: test iomap zero range via fsx and error tag Brian Foster
2025-08-11 18:19 ` Zorro Lang
2025-08-11 19:19   ` Brian Foster [this message]
2025-08-12  8:28     ` Zorro Lang
2025-08-11 18:24 ` Zorro Lang

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=aJpCTGS3bdYkVP2n@bfoster \
    --to=bfoster@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.