Linux block layer
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Omar Sandoval <osandov@fb.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Johannes Thumshirn <Johannes.Thumshirn@wdc.com>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Subject: Re: [PATCH blktests 0/2] zbd: Support dm-crypt
Date: Tue, 27 Jul 2021 02:17:10 +0000	[thread overview]
Message-ID: <20210727021709.o3s27hzhf7qeajc5@shindev> (raw)
In-Reply-To: <YP8GwrYGzv+Q/CQR@relinquished.localdomain>

On Jul 26, 2021 / 12:02, Omar Sandoval wrote:
> On Tue, Jul 13, 2021 at 07:12:37PM +0900, Shin'ichiro Kawasaki wrote:
> > Linux kernel 5.9 added zoned block device support to dm-crypt. With this zoned
> > dm-crypt device, zbd group test cases pass except zbd/007. This series makes
> > required changes to allow the test case zbd/007 pass with zoned dm-cyrpt
> > devices. The first patch adds dm-crypt support to the helper function
> > _get_dev_container_and_sector(). The second patch wipes out broken data on the
> > dm-crypt devices which was left after the test case run.
> > 
> > Shin'ichiro Kawasaki (2):
> >   zbd/rc: Support dm-crypt
> >   zbd/007: Reset test target zones at test end
> > 
> >  tests/zbd/007 |  7 +++++++
> >  tests/zbd/rc  | 20 ++++++++++++++------
> >  2 files changed, 21 insertions(+), 6 deletions(-)
> 
> The patches look reasonable. Could you provide instructions on how to
> run with zoned dm-crypt so I can run the tests?

Sure, the script below sets up a null_blk zoned and dm-crypt on top of it.

--- start ---
# create zoned null_blk device as /dev/nullb0
rmmod null_blk
modprobe null_blk nr_devices=0
cd /sys/kernel/config/nullb
mkdir nullb0
cd nullb0
echo 1 > zoned
echo 1 > memory_backed
echo 1 > power

# set up dm-crypt on /dev/nullb0
KEY_FILE=/tmp/dmckey
dd if=/dev/random of="${KEY_FILE}" bs=1 count=512 > /dev/null 2>&1
cryptsetup open --batch-mode --type plain --key-file "${KEY_FILE}" \
	   /dev/nullb0 dmctest
--- end ---

Maybe no need to mention but I used blktests config as follows. With these set
up, I confirmed that block group and zbd group test cases run without failures.

--- start ---
TEST_DEVS=(/dev/mapper/dmctest)
DEVICE_ONLY=1
--- end ---

FYI, two commands below clean up the device.

# dmsetup remove dmctest
# rmdir /sys/kernel/config/nullb/nullb0

-- 
Best Regards,
Shin'ichiro Kawasaki

      reply	other threads:[~2021-07-27  2:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 10:12 [PATCH blktests 0/2] zbd: Support dm-crypt Shin'ichiro Kawasaki
2021-07-13 10:12 ` [PATCH blktests 1/2] zbd/rc: " Shin'ichiro Kawasaki
2021-07-13 13:59   ` Bart Van Assche
2021-07-14 11:13     ` Shinichiro Kawasaki
2021-07-13 10:12 ` [PATCH blktests 2/2] zbd/007: Reset test target zones at test end Shin'ichiro Kawasaki
2021-07-26 19:02 ` [PATCH blktests 0/2] zbd: Support dm-crypt Omar Sandoval
2021-07-27  2:17   ` Shinichiro Kawasaki [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=20210727021709.o3s27hzhf7qeajc5@shindev \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Johannes.Thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    --cc=osandov@osandov.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