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