public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH blktests v2 1/2] src: add mini ublk source code
Date: Fri, 17 Feb 2023 09:42:22 +0800	[thread overview]
Message-ID: <Y+7bfuybBEOB1qtN@T590> (raw)
In-Reply-To: <20230217013851.1402864-2-ming.lei@redhat.com>

On Fri, Feb 17, 2023 at 09:38:50AM +0800, Ming Lei wrote:
> Prepare for adding ublk related test:
> 
> 1) ublk delete is sync removal, this way is convenient to
>    blkg/queue/disk instance leak issue
> 
> 2) mini ublk has two builtin target(null, loop), and loop IO is
> handled by io_uring, so we can use ublk to cover part of io_uring
> workloads
> 
> 3) not like loop/nbd, ublk won't pre-allocate/add disk, and always
> add/delete disk dynamically, this way may cover disk plug & unplug
> tests
> 
> 4) ublk specific test given people starts to use it, so better to
> let blktest cover ublk related tests
> 
> Add mini ublk source for test purpose only, which is easy to use:
> 
> ./miniublk add -t {null|loop} [-q nr_queues] [-d depth] [-n dev_id]
> 	 default: nr_queues=2(max 4), depth=128(max 128), dev_id=-1(auto allocation)
> 	 -t loop -f backing_file
> 	 -t null
> ./miniublk del [-n dev_id] [--disk/-d disk_path ] -a
> 	 -a delete all devices, -d delete device by disk path,
> 	 -n delete specified device
> ./miniublk list [-n dev_id] -a
> 	 -a list all devices, -n list specified device, default -a
> 
> ublk depends on liburing 2.2, so allow to ignore ublk build failure
> in case of missing liburing, and we will check if ublk program exits
> inside test. Also v6.0 is the 1st linux kernel release with ublk.
> 
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
>  Makefile            |    2 +-
>  src/Makefile        |   18 +
>  src/ublk/miniublk.c | 1376 +++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 1395 insertions(+), 1 deletion(-)
>  create mode 100644 src/ublk/miniublk.c
> 
> diff --git a/Makefile b/Makefile
> index 5a04479..b9bbade 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2,7 +2,7 @@ prefix ?= /usr/local
>  dest = $(DESTDIR)$(prefix)/blktests
>  
>  all:
> -	$(MAKE) -C src all
> +	$(MAKE) -i -C src all

oops, the above change needs to be removed.

Shin'ichiro, I will kill it in V3 if it is needed, otherwise
please drop the above change when you merge the patch.

Thanks,
Ming


  reply	other threads:[~2023-02-17  1:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17  1:38 [PATCH blktests v2 0/2] blktests: add mini ublk source and blktests/033 Ming Lei
2023-02-17  1:38 ` [PATCH blktests v2 1/2] src: add mini ublk source code Ming Lei
2023-02-17  1:42   ` Ming Lei [this message]
2023-02-17 14:05   ` Shinichiro Kawasaki
2023-02-20  3:13     ` Ming Lei
2023-02-17  1:38 ` [PATCH blktests v2 2/2] block/033: add test to cover gendisk leak Ming Lei
2023-02-17 14:21   ` Shinichiro Kawasaki

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=Y+7bfuybBEOB1qtN@T590 \
    --to=ming.lei@redhat.com \
    --cc=linux-block@vger.kernel.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