On 2021/04/14 23:11, Karel Zak wrote: > On Wed, Apr 14, 2021 at 10:33:36AM +0900, Naohiro Aota wrote: >> This series implements probing and wiping of the superblock of zoned btrfs. > > I have no disk with zones support, but it seems scsi_debug supports > it. Do you have any step by step example how to test with btrfs? If > yes, I will add a test to our test suite. Yes, scsi_debug does support emulating a ZBC disk. You can setup a disk like this: modprobe scsi_debug \ max_luns=1 \ sector_size=4096 \ zbc=host-managed \ dev_size_mb=2048 \ zone_size_mb=64 \ zone_nr_conv=0 This will create a 2GB capacity disk with 64 MB zones. Another solution, may be simpler, is to use null_blk. I am attaching a script that I use to create zoned null block devices. # nullblk-create.sh --help Usage: nullblk-create.sh [options] Options: -h | --help : Display this help message and exit -v : Be verbose (display final config) -cap : set device capacity (default: 8) For zoned devices, capacity is determined with zone size and total number of zones -bs : set sector size (default: 512) -m : enable memory backing (default: false) -z : create a zoned device (default: false) -qm : set queue mode (default: 2) 0=bio, 1=rq, 2=multiqueue -sq : set number of submission queues (default: nproc) -qd : set queue depth (default: 64) -im : set IRQ mode (default: 0) 0=none, 1=softirq, 2=timer -c : set completion time for timer completion (default: 10000 ns) Options for zoned devices: -zs : set zone size (default: 8 MB) -zc : set zone capacity (default: zone size) -znc : set number of conv zones (default: 0) -zns : set number of swr zones (default: 8) -zr : add a smaller runt swr zone (default: none) -zmo : set max open zones (default: no limit) -zma : set max active zones (default: no limit) Something like this: # nullblk-create.sh -m -cap 2 -z -zs 64 -znc 0 Created /dev/nullb0 Will also create a 2GB capacity disk with memory backing and 64 MB zones. For the correct setup of the drive to test btrfs, I will let Naohiro and Johannes comment. -- Damien Le Moal Western Digital Research