From: Pierre Labat Date: Fri, 15 May 2020 16:22:13 +0000 (-0500) Subject: Allow more flexibility in zone start and span X-Git-Tag: fio-3.20~12 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f09a7773f5821d5b89428419dcef1987ced39b67;p=fio.git Allow more flexibility in zone start and span Allow sequential read to start anywhere in a zone (option offset), and have a span smaller than a zone (option size). A use case is a Key Value Store reading a set of keys or values starting somewhere in a zone. Reviewed-by: Damien Le Moal Signed-off-by: Pierre Labat Signed-off-by: Jens Axboe --- diff --git a/zbd.c b/zbd.c index d8fc7ef5..36de29fb 100644 --- a/zbd.c +++ b/zbd.c @@ -262,7 +262,8 @@ static bool zbd_verify_sizes(void) zone_idx = zbd_zone_idx(f, f->file_offset); z = &f->zbd_info->zone_info[zone_idx]; - if (f->file_offset != z->start) { + if ((f->file_offset != z->start) && + (td->o.td_ddir != TD_DDIR_READ)) { new_offset = (z+1)->start; if (new_offset >= f->file_offset + f->io_size) { log_info("%s: io_size must be at least one zone\n", @@ -278,7 +279,8 @@ static bool zbd_verify_sizes(void) zone_idx = zbd_zone_idx(f, f->file_offset + f->io_size); z = &f->zbd_info->zone_info[zone_idx]; new_end = z->start; - if (f->file_offset + f->io_size != new_end) { + if ((td->o.td_ddir != TD_DDIR_READ) && + (f->file_offset + f->io_size != new_end)) { if (new_end <= f->file_offset) { log_info("%s: io_size must be at least one zone\n", f->file_name);