All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Vincent Fu <vincentfu@gmail.com>
Cc: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>,
	Niklas Cassel <niklas.cassel@wdc.com>
Subject: Re: [PATCH 2/2] t/zbd: add test case to confirm no write with rwmixwrite=0 option
Date: Wed, 20 Dec 2023 10:31:29 +0900	[thread overview]
Message-ID: <cde7f3ae-917f-41ec-93e5-69eb656370e8@kernel.org> (raw)
In-Reply-To: <20231220005846.1371456-3-shinichiro.kawasaki@wdc.com>

On 12/20/23 09:58, Shin'ichiro Kawasaki wrote:
> The previous commit fixed the issue of the unexpected write with options
> zonemode=zbd, rw=randrw and rwmixwrite=0. Add a test to confirm the fix.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> ---
>  t/zbd/test-zbd-support | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support
> index 2f15a191..532860eb 100755
> --- a/t/zbd/test-zbd-support
> +++ b/t/zbd/test-zbd-support
> @@ -1561,6 +1561,29 @@ test67() {
>  	grep -q 'Exceeded max_active_zones limit' "${logfile}.${test_number}"
>  }
>  
> +# Test rw=randrw and rwmixwrite=0 options do not issue write I/O unit
> +test68() {
> +	local off size
> +
> +	require_zbd || return "$SKIP_TESTCASE"
> +
> +	reset_zone "${dev}" -1
> +
> +	# Write some data as preparation
> +	off=$((first_sequential_zone_sector * 512))
> +	size=$min_seq_write_size
> +	run_one_fio_job "$(ioengine "psync")" --rw=write --offset="$off" \
> +			--io_size="$size" --zonemode=strided \
> +			--zonesize="$zone_size" --zonerange="$zone_size" \
> +		       >> "${logfile}.${test_number}" 2>&1 || return $?
> +	# Run random mixed read and write specifying zero write ratio
> +	run_fio_on_seq "$(ioengine "psync")" --rw=randrw --rwmixwrite=0 \
> +		       --time_based --runtime=1s \
> +		       >> "${logfile}.${test_number}" 2>&1 || return $?
> +	# "WRITE:" shall be recoreded only once for the preparation
> +	[[ $(grep -c "WRITE:" "${logfile}.${test_number}") == 1 ]]
> +}
> +
>  SECONDS=0
>  tests=()
>  dynamic_analyzer=()

Looks good.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-12-20  1:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-20  0:58 [PATCH 0/2] zbd: fix unexpected write with rwmixwrite=0 option Shin'ichiro Kawasaki
2023-12-20  0:58 ` [PATCH 1/2] zbd: avoid " Shin'ichiro Kawasaki
2023-12-20  1:30   ` Damien Le Moal
2023-12-20  0:58 ` [PATCH 2/2] t/zbd: add test case to confirm no " Shin'ichiro Kawasaki
2023-12-20  1:31   ` Damien Le Moal [this message]
2023-12-20  2:52 ` [PATCH 0/2] zbd: fix unexpected " Jens Axboe

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=cde7f3ae-917f-41ec-93e5-69eb656370e8@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=Dmitry.Fomichev@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=niklas.cassel@wdc.com \
    --cc=shinichiro.kawasaki@wdc.com \
    --cc=vincentfu@gmail.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.