All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Tal Zussman <tz2294@columbia.edu>
Cc: fstests@vger.kernel.org, Zorro Lang <zlang@kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	linux-ext4@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	"Darrick J. Wong" <djwong@kernel.org>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 2/3] common/rc: pass -V 1 when probing pwrite and pread -U
Date: Thu, 22 Oct 2026 09:25:34 -0400	[thread overview]
Message-ID: <atoOzsNo8zUTrxVj@bfoster> (raw)
In-Reply-To: <20261015-dontcache-test-v1-2-6aa7583973a9@columbia.edu>

On Thu, Oct 15, 2026 at 04:54:03PM -0400, Tal Zussman wrote:
> xfs_io refuses pwritev2() and preadv2() flags unless -V is given, so
> probing -U without it always fails. Pass -V 1 for -U in both the pwrite
> and pread cases.
> 
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
> ---
>  common/rc | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 945c9e42..a0239034 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3105,6 +3105,10 @@ _require_xfs_io_command()
>  			opts+=" -d"
>  			pwrite_opts+="-V 1 -b $write_size"
>  		fi
> +		# -U (RWF_DONTCACHE) only works with vectored I/O writes
> +		if [ "$param" == "-U" ]; then
> +			pwrite_opts+="-V 1 -b $write_size"
> +		fi
>  		if [ "$param" == "-A" ]; then
>  			opts+=" -d"
>  			# try to write the minimum supported atomic write size
> @@ -3121,9 +3125,14 @@ _require_xfs_io_command()
>  		param_checked="$pwrite_opts $param"
>  		;;
>  	"pread")
> +		# -U (RWF_DONTCACHE) only works with vectored I/O reads
> +		local pread_opts=" "
> +		if [ "$param" == "-U" ]; then
> +			pread_opts+="-V 1 -b 4k"
> +		fi
>  		testio=`$XFS_IO_PROG -f -c "pwrite 0 4k" \
> -			-c "pread $param 0 4k" $testfile 2>&1`
> -		param_checked="$param"
> +			-c "pread $pread_opts $param 0 4k" $testfile 2>&1`
> +		param_checked="$pread_opts $param"
>  		;;

I find it a little odd that we auto add command related options here
even though the test still needs to know to use those options for the
commands to work correctly. But I guess there's precedent for it, so oh
well:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  	"scrub"|"repair")
>  		test -z "$param" && param="probe"
> 
> -- 
> 2.39.5
> 
> 


  reply	other threads:[~2026-10-22 13:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 20:54 [PATCH 0/3] fstests: test that RWF_DONTCACHE I/O drops its folios Tal Zussman
2026-10-15 20:54 ` [PATCH 1/3] common/rc: probe pread options with a real read Tal Zussman
2026-10-22 13:25   ` Brian Foster
2026-10-28 15:59   ` Christoph Hellwig
2026-10-15 20:54 ` [PATCH 2/3] common/rc: pass -V 1 when probing pwrite and pread -U Tal Zussman
2026-10-22 13:25   ` Brian Foster [this message]
2026-10-28 16:00     ` Christoph Hellwig
2026-10-15 20:54 ` [PATCH 3/3] generic/810: check that RWF_DONTCACHE I/O drops its folios Tal Zussman
2026-10-22 13:25   ` Brian Foster
2026-10-28 16:01   ` Christoph Hellwig

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=atoOzsNo8zUTrxVj@bfoster \
    --to=bfoster@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tz2294@columbia.edu \
    --cc=zlang@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 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.