[PATCH] zbd: Improve job zonesize initialization checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux