Revert "zbd: Report the zone capacity"
authorNiklas Cassel <niklas.cassel@wdc.com>
Thu, 27 Apr 2023 09:24:23 +0000 (11:24 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 27 Apr 2023 11:08:29 +0000 (05:08 -0600)
This reverts commit 067c18eb3700373d029a9f2795d662453fc09cf4.

In the Linux zoned block devices API (blkzoned.h) (and in the NVMe Zoned
Namespace Command Set Specification), the zone capacity can be different
for each zone (unlike zone size, which has to be the same for all zones).

In order to not mislead the user to think that the zone capacity has to
be the same for all zones, remove the zone capacity for zone0 from the
per device print.

The zone capacity can be printed in prints that are related to a specific
zone, e.g. when encountering an error when performing I/O to a zone.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20230427092423.605250-1-nks@flawful.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c

diff --git a/zbd.c b/zbd.c
index f5fb923ac07c5017018048a625490f45c15db612..351b3971ff07cab381fecdc46ffd6ee354b6441a 100644 (file)
--- a/zbd.c
+++ b/zbd.c
@@ -804,8 +804,8 @@ static int parse_zone_info(struct thread_data *td, struct fio_file *f)
                goto out;
        }
 
-       dprint(FD_ZBD, "Device %s has %d zones of size %"PRIu64" KB and capacity %"PRIu64" KB\n",
-              f->file_name, nr_zones, zone_size / 1024, zones[0].capacity / 1024);
+       dprint(FD_ZBD, "Device %s has %d zones of size %"PRIu64" KB\n",
+              f->file_name, nr_zones, zone_size / 1024);
 
        zbd_info = scalloc(1, sizeof(*zbd_info) +
                           (nr_zones + 1) * sizeof(zbd_info->zone_info[0]));