From nobody Sun Nov 24 03:42:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1727614950; cv=none; d=zohomail.com; s=zohoarc; b=aBGrN++j05VjKwOuw1yBC3VwWz7kiPfjixckaQpACF6Gm8rcb88HLQJyxmk8S5kHBaGXr0PQiWKDTQ0rtShX4GIUyXyOFyL0TtyWQQ9SwXsKPB3ffv3fzZSd7TciMrh6FkX0PvGMUPc0jXrLZLEFOpo9jznS0RT/iOwp04UAKJw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1727614950; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ySJ9m73fa5O5Qrv08pA7dpL1hTljmRlpVpiHdfgnF6M=; b=ScBH9vosKqSH3Y7qwxgUCJLqLozuIobnH2xncTwQTkKAhkwvqEy16AbzCA3UzhJGZSqcA+C1iwRa2EQ6ckH/e2HiTqI+gDevnWEr2MYe7Hm+43wAKIBDBgQ5MNi+qoT8HbDzOal6RWX3zGCb6ZM6kR15wZq+pUQsvJ+KG92T01Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1727614950257770.1603823258228; Sun, 29 Sep 2024 06:02:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sutYY-0002dh-0q; Sun, 29 Sep 2024 09:01:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sutYW-0002Wr-9H; Sun, 29 Sep 2024 09:01:44 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sutYT-00043Q-Gx; Sun, 29 Sep 2024 09:01:43 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a8d446adf6eso590190266b.2; Sun, 29 Sep 2024 06:01:40 -0700 (PDT) Received: from groves.fkb.profitbricks.net (ip5f5af605.dynamic.kabel-deutschland.de. [95.90.246.5]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c27776cesm373146966b.40.2024.09.29.06.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 06:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727614899; x=1728219699; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ySJ9m73fa5O5Qrv08pA7dpL1hTljmRlpVpiHdfgnF6M=; b=gFqpy1qLLBoSQJvodViMoXLpz1u6wx0NfeY99wHKY2fnzLEQoezFinT1cucILqw2Xq 9hWHddlfK5veoSowJYXaAfhGBQKSDhXWCy+rT6mC3EBatZ7YgFhzfk93mDJpu9HPh8yv Qbrl2XnxeqqvXnxpuxlrM1bAkh+UosSV7GdCz0MSkl/aZukeCCkj3Zvxgu9wEmJ01n+g IwPDl9Zo+jrtn9vPhprwLg1e3u9ZpFOlHqIdLWQJW7S0qdRA5W7NiXh7ViekBP5UXTJ6 1O0yycxYx6kLKTETLsI0PF4cwTFdDtv0APQEiklcBQA+nTxcH5Qolde17jWQR5e1hmIw QN/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727614899; x=1728219699; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ySJ9m73fa5O5Qrv08pA7dpL1hTljmRlpVpiHdfgnF6M=; b=ahsfkDn2JvX8Q8HwsIedh1lezGb6Oaw4h6chiDFZYaDyoPiFGpTw31C647owBXC9da AGQgdRCp6TwLKQW+uVApTlXUcYBkmp3mGU/v6I8hmOV6dzUfP2DoLO3b42v8nZLvMGGd lJM9YLv31VcaGbNRLLdxhSolB/uXS/JdlEvH5gJKYnRhQt/m+eqipXV2czqua7h2Yj9B k/p8HiTeEAvJbAqc/1/hviq8s71PKDyjuIxMfAAvzsgBHnNvqGrQRFisW8wTuYfD3mNw J5QYpmF2R2BOxa4DM7khq+7jYlSvw46tTCq/L8wX9x0wnZpF9A8uJGzVf+ElhRIwnaob lkMw== X-Forwarded-Encrypted: i=1; AJvYcCVlpVByJisNfFEsBMr27vFEks8o+Tb3xzD0RioEI2/yvXoJbm0AzsQVA/HAqBhvc/r1+kI3ooXOmGfw@nongnu.org X-Gm-Message-State: AOJu0Yxl06e6yoS8j8I6qpcNbVborwdBh0k/Q4pj3T134oLlCWKxh0iu Fvej35cW4+4f+HoP5kr42W6Gsj8T+aNw8HvH5UXv0S9fNQkpS69y5zlaAdqJ X-Google-Smtp-Source: AGHT+IHfAaR+BrBz3D3Ix4ncGVhQjPOqN3mrSrIH4+HLV7NUHIxMUBv2e8V3hm8faCl//lmZGpTD7Q== X-Received: by 2002:a17:907:7207:b0:a8d:2b7a:ff44 with SMTP id a640c23a62f3a-a93c492a6aamr1091150966b.32.1727614899045; Sun, 29 Sep 2024 06:01:39 -0700 (PDT) From: Sam Li X-Google-Original-From: Sam Li To: qemu-devel@nongnu.org Cc: Markus Armbruster , stefanha@redhat.com, Kevin Wolf , Eric Blake , dmitry.fomichev@wdc.com, Hanna Reitz , dlemoal@kernel.org, qemu-block@nongnu.org, hare@suse.de, Sam Li Subject: [PATCH v8 4/4] iotests: test the zoned format feature for qcow2 file Date: Sun, 29 Sep 2024 15:01:33 +0200 Message-Id: <20240929130133.535568-5-jia.li@ionos.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240929130133.535568-1-jia.li@ionos.com> References: <20240929130133.535568-1-jia.li@ionos.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=faithilikerun@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1727614951741116600 Content-Type: text/plain; charset="utf-8" From: Sam Li The zoned format feature can be tested by: $ tests/qemu-iotests/check -qcow2 zoned-qcow2 Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/tests/zoned-qcow2 | 148 +++++++++++++++++++ tests/qemu-iotests/tests/zoned-qcow2.out | 173 +++++++++++++++++++++++ 2 files changed, 321 insertions(+) create mode 100755 tests/qemu-iotests/tests/zoned-qcow2 create mode 100644 tests/qemu-iotests/tests/zoned-qcow2.out diff --git a/tests/qemu-iotests/tests/zoned-qcow2 b/tests/qemu-iotests/test= s/zoned-qcow2 new file mode 100755 index 0000000000..da5b8944c5 --- /dev/null +++ b/tests/qemu-iotests/tests/zoned-qcow2 @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +# +# Test zone management operations for qcow2 file. +# + +seq=3D"$(basename $0)" +echo "QA output created by $seq" +status=3D1 # failure is the default! + +file_name=3D"zbc.qcow2" +_cleanup() +{ + _cleanup_test_img + _rm_test_img "$file_name" +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ../common.rc +. ../common.filter +. ../common.qemu + +# This test only runs on Linux hosts with qcow2 image files. +_supported_fmt qcow2 +_supported_proto file +_supported_os Linux + +echo +echo "=3D=3D=3D Initial image setup =3D=3D=3D" +echo + +$QEMU_IMG create -f qcow2 $file_name -o size=3D768M -o zone.size=3D64M -o \ +zone.capacity=3D64M -o zone.conventional_zones=3D0 -o zone.max_append_byte= s=3D32M \ +-o zone.max_open_zones=3D6 -o zone.max_active_zones=3D8 -o zone.mode=3Dhos= t-managed + +IMG=3D"--image-opts -n driver=3Dqcow2,file.driver=3Dfile,file.filename=3D$= file_name" +QEMU_IO_OPTIONS=3D$QEMU_IO_OPTIONS_NO_FMT + +echo +echo "=3D=3D=3D Testing a qcow2 img with zoned format =3D=3D=3D" +echo +echo "case 1: test zone operations one by one" + +echo "(1) report zones[0]:" +$QEMU_IO $IMG -c "zrp 0 1" +echo +echo "report zones[0~9]:" +$QEMU_IO $IMG -c "zrp 0 10" +echo +echo "report zones[-1]:" # zones[-1] dictates the last zone +$QEMU_IO $IMG -c "zrp 0x2C000000 2" # 0x2C000000 / 512 =3D 0x160000 +echo +echo +echo "(2) open zones[0], zones[1], zones[-1] then close, finish, reset:" +$QEMU_IO $IMG << EOF +zo 0 0x4000000 +zrp 0 1 +zo 0x4000000 0x4000000 +zrp 0x4000000 1 +zo 0x2C000000 0x4000000 +zrp 0x2C000000 2 +zc 0 0x4000000 +zrp 0 1 +zc 0x4000000 0x4000000 +zrp 0x4000000 1 +zc 0x2C000000 0x4000000 +zrp 0x2C000000 2 +zf 0 0x4000000 +zrp 0 1 +zf 64M 64M +zrp 0x4000000 2 +zf 0x2C000000 0x4000000 +zrp 0x2C000000 2 +zrs 0 0x4000000 +zrp 0 1 +zrs 0x4000000 0x4000000 +zrp 0x4000000 1 +zrs 0x2C000000 0x4000000 +zrp 0x2C000000 2 +EOF + +echo +echo "(3) append write with (4k, 8k) data" +$QEMU_IO $IMG -c "zrp 0 12" # the physical block size of the device is 4096 +echo "Append write zones[0], zones[1] twice" +$QEMU_IO $IMG << EOF +zap -p 0 0x1000 0x2000 +zrp 0 1 +zap -p 0 0x1000 0x2000 +zrp 0 1 +zap -p 0x4000000 0x1000 0x2000 +zrp 0x4000000 1 +zap -p 0x4000000 0x1000 0x2000 +zrp 0x4000000 1 +EOF + +echo +echo "Reset all:" +$QEMU_IO $IMG -c "zrp 0 12" -c "zrs 0 768M" -c "zrp 0 12" +echo +echo + +echo "case 2: test a sets of ops that works or not" +echo "(1) append write (4k, 4k) and then write to full" +$QEMU_IO $IMG << EOF +zap -p 0 0x1000 0x1000 +zrp 0 1 +zap -p 0 0x1000 0x1ffd000 +zap -p 0 0x1000000 0x1000000 +zrp 0 1 +EOF + +echo "Reset zones[0]:" +$QEMU_IO $IMG -c "zrs 0 64M" -c "zrp 0 1" + +echo "(2) write in zones[0], zones[3], zones[8], and then reset all" +$QEMU_IO $IMG << EOF +zap -p 0 0x1000 0x1000 +zap -p 0xc000000 0x1000 0x1000 +zap -p 0x20000000 0x1000 0x1000 +zrp 0 12 +zrs 0 768M +zrp 0 12 +EOF + +echo "case 3: test zone resource management" +echo "(1) write in zones[0], zones[1], zones[2] and then close it" +$QEMU_IO $IMG << EOF +zap -p 0 0x1000 0x1000 +zap -p 0x4000000 0x1000 0x1000 +zap -p 0x8000000 0x1000 0x1000 +zrp 0 12 +zc 0 64M +zc 0x4000000 64M +zc 0x8000000 64M +zrp 0 12 +EOF + +echo "(2) reset all after 3(1)" +$QEMU_IO $IMG << EOF +zrs 0 768M +zrp 0 12 +EOF + +# success, all done +echo "*** done" +rm -f $seq.full +status=3D0 diff --git a/tests/qemu-iotests/tests/zoned-qcow2.out b/tests/qemu-iotests/= tests/zoned-qcow2.out new file mode 100644 index 0000000000..b62865a487 --- /dev/null +++ b/tests/qemu-iotests/tests/zoned-qcow2.out @@ -0,0 +1,173 @@ +QA output created by zoned-qcow2 + +=3D=3D=3D Initial image setup =3D=3D=3D + +Formatting 'zbc.qcow2', fmt=3Dqcow2 cluster_size=3D65536 extended_l2=3Doff= compression_type=3Dzlib zone.mode=3Dhost-managed zone.size=3D67108864 zone= .capacity=3D67108864 zone.conventional_zones=3D0 zone.max_append_bytes=3D33= 554432 zone.max_active_zones=3D8 zone.max_open_zones=3D6 size=3D805306368 l= azy_refcounts=3Doff refcount_bits=3D16 + +=3D=3D=3D Testing a qcow2 img with zoned format =3D=3D=3D + +case 1: test zone operations one by one +(1) report zones[0]: +start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1, [type: 2] + +report zones[0~9]: +start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1, [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] + +report zones[-1]: +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] + + +(2) open zones[0], zones[1], zones[-1] then close, finish, reset: +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:3,= [type: 2] +qemu-io> qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, = zcond:3, [type: 2] +qemu-io> qemu-io> start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000= , zcond:3, [type: 2] +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1,= [type: 2] +qemu-io> qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, = zcond:1, [type: 2] +qemu-io> qemu-io> start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000= , zcond:1, [type: 2] +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x20000, zcon= d:14, [type: 2] +qemu-io> qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x40000, = zcond:14, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +qemu-io> qemu-io> start: 0x160000, len 0x20000, cap 0x20000, wptr 0x180000= , zcond:14, [type: 2] +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1,= [type: 2] +qemu-io> qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, = zcond:1, [type: 2] +qemu-io> qemu-io> start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000= , zcond:1, [type: 2] +qemu-io>=20 +(3) append write with (4k, 8k) data +start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1, [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +Append write zones[0], zones[1] twice +qemu-io> After zap done, the append sector is 0x0 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x18, zcond:2, [type: = 2] +qemu-io> After zap done, the append sector is 0x18 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x30, zcond:2, [type: = 2] +qemu-io> After zap done, the append sector is 0x20000 +qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20018, zcond:2, = [type: 2] +qemu-io> After zap done, the append sector is 0x20018 +qemu-io> start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20030, zcond:2, = [type: 2] +qemu-io>=20 +Reset all: +start: 0x0, len 0x20000, cap 0x20000, wptr 0x30, zcond:4, [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20030, zcond:4, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1, [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] + + +case 2: test a sets of ops that works or not +(1) append write (4k, 4k) and then write to full +qemu-io> After zap done, the append sector is 0x0 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x10, zcond:2, [type: = 2] +qemu-io> After zap done, the append sector is 0x10 +qemu-io> After zap done, the append sector is 0x10000 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x20000, zcond:14, [ty= pe: 2] +qemu-io> Reset zones[0]: +start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1, [type: 2] +(2) write in zones[0], zones[3], zones[8], and then reset all +qemu-io> After zap done, the append sector is 0x0 +qemu-io> After zap done, the append sector is 0x60000 +qemu-io> After zap done, the append sector is 0x100000 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x10, zcond:2, [type: = 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60010, zcond:2, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100010, zcond:2, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1,= [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +qemu-io> case 3: test zone resource management +(1) write in zones[0], zones[1], zones[2] and then close it +qemu-io> After zap done, the append sector is 0x0 +qemu-io> After zap done, the append sector is 0x20000 +qemu-io> After zap done, the append sector is 0x40000 +qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x10, zcond:2, [type: = 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20010, zcond:2, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40010, zcond:2, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +qemu-io> qemu-io> qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, = wptr 0x10, zcond:4, [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20010, zcond:4, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40010, zcond:4, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +qemu-io> (2) reset all after 3(1) +qemu-io> qemu-io> start: 0x0, len 0x20000, cap 0x20000, wptr 0x0, zcond:1,= [type: 2] +start: 0x20000, len 0x20000, cap 0x20000, wptr 0x20000, zcond:1, [type: 2] +start: 0x40000, len 0x20000, cap 0x20000, wptr 0x40000, zcond:1, [type: 2] +start: 0x60000, len 0x20000, cap 0x20000, wptr 0x60000, zcond:1, [type: 2] +start: 0x80000, len 0x20000, cap 0x20000, wptr 0x80000, zcond:1, [type: 2] +start: 0xa0000, len 0x20000, cap 0x20000, wptr 0xa0000, zcond:1, [type: 2] +start: 0xc0000, len 0x20000, cap 0x20000, wptr 0xc0000, zcond:1, [type: 2] +start: 0xe0000, len 0x20000, cap 0x20000, wptr 0xe0000, zcond:1, [type: 2] +start: 0x100000, len 0x20000, cap 0x20000, wptr 0x100000, zcond:1, [type: = 2] +start: 0x120000, len 0x20000, cap 0x20000, wptr 0x120000, zcond:1, [type: = 2] +start: 0x140000, len 0x20000, cap 0x20000, wptr 0x140000, zcond:1, [type: = 2] +start: 0x160000, len 0x20000, cap 0x20000, wptr 0x160000, zcond:1, [type: = 2] +qemu-io> *** done --=20 2.34.1