Linux block layer
 help / color / mirror / Atom feed
From: Ofir Gal <ofir.gal@volumez.com>
To: Daniel Wagner <dwagner@suse.de>
Cc: shinichiro.kawasaki@wdc.com, linux-block@vger.kernel.org,
	linux-nvme@lists.infradead.org, chaitanyak@nvidia.com
Subject: Re: [PATCH blktests v2 2/2] md: add regression test for "md/md-bitmap: fix writing non bitmap pages"
Date: Tue, 16 Jul 2024 14:49:40 +0300	[thread overview]
Message-ID: <5fe07e68-b929-4713-9679-51b99858d7f8@volumez.com> (raw)
In-Reply-To: <wgza656pr5scdqiaxi4vekoffp42jvzao5kcxy7zptdgwstyik@zfcgftuzn6pf>



On 6/25/24 18:01, Daniel Wagner wrote:
> On Mon, Jun 24, 2024 at 01:46:18PM GMT, Ofir Gal wrote:
>> +#restrict test to nvme-tcp only
>> +nvme_trtype=tcp
>> +nvmet_blkdev_type="device"
>> +
>> +requires() {
>> +	# Require dm-stripe
>> +	_have_program dmsetup
>> +	_have_driver dm-mod
>> +
>> +	_require_nvme_trtype tcp
>> +	_have_brd
>> +}
>> +
>> +# Sets up a brd device of 1G with optimal-io-size of 256K
>> +setup_underlying_device() {
>> +	if ! _init_brd rd_size=1048576 rd_nr=1; then
>> +		return 1
>> +	fi
>> +
>> +	dmsetup create ram0_big_optio --table \
>> +		"0 $(blockdev --getsz /dev/ram0) striped 1 512 /dev/ram0 0"
>> +}
>> +
>> +cleanup_underlying_device() {
>> +	dmsetup remove ram0_big_optio
>> +	_cleanup_brd
>> +}
>> +
>> +# Sets up a local host nvme over tcp
>> +setup_nvme_over_tcp() {
>> +	_setup_nvmet
>> +
>> +	local port
>> +	port="$(_create_nvmet_port "${nvme_trtype}")"
>> +
>> +	_create_nvmet_subsystem "blktests-subsystem-0" "/dev/mapper/ram0_big_optio"
>> +	_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-0"
> Use the defaults from blktests, e.g. ${def_subsysnqn}"
>
>> +
>> +	_create_nvmet_host "blktests-subsystem-0" "${def_hostnqn}"
>> +
>> +	_nvme_connect_subsys --subsysnqn "blktests-subsystem-0"
>> +
>> +	local nvmedev
>> +	nvmedev=$(_find_nvme_dev "blktests-subsystem-0")
> here too
>
>> +	echo "${nvmedev}"
>> +}
>> +
>> +cleanup_nvme_over_tcp() {
>> +	local nvmedev=$1
>> +	_nvme_disconnect_ctrl "${nvmedev}"
>> +	_nvmet_target_cleanup --subsysnqn "blktests-subsystem-0"
> same here
>
>> +}
>> +
>> +test() {
>> +	echo "Running ${TEST_NAME}"
>> +
>> +	setup_underlying_device
>> +	local nvmedev
>> +	nvmedev=$(setup_nvme_over_tcp)
>> +
>> +	# Hangs here without the fix
>> +	mdadm --quiet --create /dev/md/blktests_md --level=1 --bitmap=internal \
>> +		--bitmap-chunk=1024K --assume-clean --run --raid-devices=2 \
>> +		/dev/"${nvmedev}"n1 missing
> Instead hard coding the namespace ID, this should be made a bit more
> robust by looking it up with _find_nvme_ns.
Thanks, applied comments to v3.

      reply	other threads:[~2024-07-16 11:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 10:46 [PATCH blktests v2 0/2] md: add regression test for "md/md-bitmap: fix writing non bitmap pages" Ofir Gal
2024-06-24 10:46 ` [PATCH blktests v2 1/2] nvme: move helper functions to common/nvme Ofir Gal
2024-06-26 11:18   ` Shinichiro Kawasaki
2024-07-16  9:23     ` Ofir Gal
2024-07-16 11:10       ` Ofir Gal
2024-06-24 10:46 ` [PATCH blktests v2 2/2] md: add regression test for "md/md-bitmap: fix writing non bitmap pages" Ofir Gal
2024-06-25 15:01   ` Daniel Wagner
2024-07-16 11:49     ` Ofir Gal [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=5fe07e68-b929-4713-9679-51b99858d7f8@volumez.com \
    --to=ofir.gal@volumez.com \
    --cc=chaitanyak@nvidia.com \
    --cc=dwagner@suse.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=shinichiro.kawasaki@wdc.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