On 30/04/2021 12:05, Filipe Manana wrote: > On Thu, Apr 29, 2021 at 1:40 PM Johannes Thumshirn > <johannes.thumshirn@xxxxxxx> wrote: >> >> Add a test for commit 18bb8bbf13c1 ("btrfs: zoned: automatically reclaim >> zones"). >> >> This test creates a two file on a newly created FS in a way that when we >> delete the first one, an auto reclaim process will be triggered by the FS. >> >> After the reclaim process, it verifies that the data was moved to another >> zone and old zone was successfully reset. >> >> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> > > Looks good, however I don't have an environment for testing zoned > mode, so this is just really eyeballing. This maybe is something I should document for the rest of us. In essence it's: create_zoned_null_blk() { dev="/sys/kernel/config/nullb/$1" mkdir "$dev" || _fatal "cannot create nullb0 device" size=12800 # MB echo 2 > "$dev"/submit_queues echo "${size}" > "${dev}"/size echo 1 > "${dev}"/zoned echo 4 > "${dev}"/zone_nr_conv echo 1 > "${dev}"/memory_backed echo 1 > "$dev"/power } for d in nullb0 nullb1; do create_zoned_null_blk $d done for creating two zoned null_blk devices with 4 conventional zones and 256MB zone size. > Thanks. > > Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx> Thanks