summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Fu <vincent.fu@wdc.com>2019-10-15 10:29:56 -0400
committerJens Axboe <axboe@kernel.dk>2019-10-15 09:14:49 -0600
commit35f561eb40bc3fffd6bfa05f39769087b7fceae4 (patch)
tree8de9521557e43079d0ee32d4d607cdf6e78c33e3
parent5cd4efe903798f2185a347911a9440324558c89f (diff)
downloadfio-35f561eb40bc3fffd6bfa05f39769087b7fceae4.tar.gz
fio-35f561eb40bc3fffd6bfa05f39769087b7fceae4.tar.bz2
io_u: skip to the next zone when zoneskip is set to zero
If zoneskip is not set or set to 0 in zonemode=strided mode, all IO occurs in a single zone. If zoneskip is non-zero, the next zone begins zoneskip bytes beyond the end of the current zone. Thus, it's not possible to access contiguous zones since zoneskip bytes will separate the end of one zone and the beginning of the next zone. This patch allows fio to move to the next zone when zoneskip is explicitly set to 0, making it possible to issue IO to contiguous zones. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_u.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_u.c b/io_u.c
index 94899552..5cbbe85a 100644
--- a/io_u.c
+++ b/io_u.c
@@ -850,7 +850,8 @@ static void setup_strided_zone_mode(struct thread_data *td, struct io_u *io_u)
/*
* See if it's time to switch to a new zone
*/
- if (td->zone_bytes >= td->o.zone_size && td->o.zone_skip) {
+ if (td->zone_bytes >= td->o.zone_size &&
+ fio_option_is_set(&td->o, zone_skip)) {
td->zone_bytes = 0;
f->file_offset += td->o.zone_range + td->o.zone_skip;