Re: Zoned block device support for fio

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

 



On 8/24/18 10:42 AM, Bart Van Assche wrote:
>> zbd_init() should not be something that
>> is unconditionally called. Only do it if ZONE_MODE_ZBD is set and make
>> that explicit.
> 
> There is a test in the zbd_init() code that makes fio report an error
> message if --zonemode=zbd has not been specified for zoned block devices:
> 
> 	if (td->o.zone_mode != ZONE_MODE_ZBD) {
>  		for_each_file(td, f, i) {
> 			if (get_zbd_model(f->file_name) != ZBD_DM_HOST_MANAGED)
> 				continue;
> 			log_err("%s: Using --zonemode=zbd is mandatory for host-managed drives\n\n",
> 				f->file_name);
> 			return 1;
> 		}
> 	}
> 
> I think that error message is very helpful for people who run fio for the
> first time against a zoned block device so I would like to keep that error
> message. However, I'm not sure where you would like me to move that code if
> zbd_init() is only called for --zonemode=zbd?

That's exactly what I'm objecting to. If someone doesn't ask for zoned
behavior, don't do any of that. If the test then fails, then the test
will fail. Don't look or parse any of that stuff. If need be, you could
introduce an error check similarly to how we add an extra information
note if the first O_DIRECT IO fails, for instance.

-- 
Jens Axboe




[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