Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH] zbd: Improve job zonesize initialization checks
@ 2019-08-30  2:16 Damien Le Moal
  2019-08-30  2:51 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Damien Le Moal @ 2019-08-30  2:16 UTC (permalink / raw)
  To: fio, Jens Axboe

For a multijob workload, each job may specify a zonesize option for
access to a zoned block device or regular device with zonemode=zbd.
In such case, make sure that the zone size value specified by each job
matches the device zone size.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 zbd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/zbd.c b/zbd.c
index 0a573692..99310c49 100644
--- a/zbd.c
+++ b/zbd.c
@@ -127,6 +127,11 @@ static bool zbd_verify_sizes(void)
 						f->file_name);
 					return false;
 				}
+			} else if (td->o.zone_size != f->zbd_info->zone_size) {
+				log_err("%s: job parameter zonesize %llu does not match disk zone size %llu.\n",
+					f->file_name, (unsigned long long) td->o.zone_size,
+					(unsigned long long) f->zbd_info->zone_size);
+				return false;
 			}
 
 			if (td->o.zone_skip &&
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] zbd: Improve job zonesize initialization checks
  2019-08-30  2:16 [PATCH] zbd: Improve job zonesize initialization checks Damien Le Moal
@ 2019-08-30  2:51 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-08-30  2:51 UTC (permalink / raw)
  To: Damien Le Moal, fio

On 8/29/19 8:16 PM, Damien Le Moal wrote:
> For a multijob workload, each job may specify a zonesize option for
> access to a zoned block device or regular device with zonemode=zbd.
> In such case, make sure that the zone size value specified by each job
> matches the device zone size.

Applied.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-30  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-30  2:16 [PATCH] zbd: Improve job zonesize initialization checks Damien Le Moal
2019-08-30  2:51 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox