Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Aug 5, 2021

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 382975557e632efb506836bc1709789e615c9094:

fio: remove raw device support (2021-08-03 12:20:22 -0600)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 2459bd33b3dbb7a34f28c612d595311a6bc7593d:

  ioengines: fix crash with --enghelp option (2021-08-04 12:49:57 -0600)

----------------------------------------------------------------
Ankit Kumar (2):
HOWTO: Add missing documentation for job_max_open_zones
zbd: Improve random zone index generation logic

Vincent Fu (2):
backend: clarify io scheduler setting error message
ioengines: fix crash with --enghelp option

 HOWTO       |  5 +++++
 backend.c   |  2 +-
 ioengines.c | 10 +++++-----
 zbd.c       |  5 +++--
 4 files changed, 14 insertions(+), 8 deletions(-)

---

Diff of recent changes:

HOWTO +5 -0
index 59c7f1ff..d4e620de 100644
@@ -1055,6 +1055,11 @@ Target file/device
 	number of open zones is defined as the number of zones to which write
 	commands are issued.
 
+.. option:: job_max_open_zones=int
+
+	Limit on the number of simultaneously opened zones per single
+	thread/process.
+
 .. option:: zone_reset_threshold=float
 
 	A number between zero and one that indicates the ratio of logical
backend.c +1 -1
index 6290e0d6..808e4362 100644
@@ -1407,7 +1407,7 @@ static int set_ioscheduler(struct thread_data *td, struct fio_file *file)
 
 	sprintf(tmp2, "[%s]", td->o.ioscheduler);
 	if (!strstr(tmp, tmp2)) {
-		log_err("fio: io scheduler %s not found\n", td->o.ioscheduler);
+		log_err("fio: unable to set io scheduler to %s\n", td->o.ioscheduler);
 		td_verror(td, EINVAL, "iosched_switch");
 		fclose(f);
 		return 1;
ioengines.c +5 -5
index dd61af07..d08a511a 100644
@@ -692,17 +692,17 @@ int fio_show_ioengine_help(const char *engine)
 	}
 
 	td.o.ioengine = (char *)engine;
-	io_ops = load_ioengine(&td);
+	td.io_ops = load_ioengine(&td);
 
-	if (!io_ops) {
+	if (!td.io_ops) {
 		log_info("IO engine %s not found\n", engine);
 		return 1;
 	}
 
-	if (io_ops->options)
-		ret = show_cmd_help(io_ops->options, sep);
+	if (td.io_ops->options)
+		ret = show_cmd_help(td.io_ops->options, sep);
 	else
-		log_info("IO engine %s has no options\n", io_ops->name);
+		log_info("IO engine %s has no options\n", td.io_ops->name);
 
 	free_ioengine(&td);
 	return ret;
zbd.c +3 -2
index 04c68dea..43f12b45 100644
@@ -1184,11 +1184,12 @@ out:
 	return res;
 }
 
-/* Anything goes as long as it is not a constant. */
+/* Return random zone index for one of the open zones. */
 static uint32_t pick_random_zone_idx(const struct fio_file *f,
 				     const struct io_u *io_u)
 {
-	return io_u->offset * f->zbd_info->num_open_zones / f->real_file_size;
+	return (io_u->offset - f->file_offset) * f->zbd_info->num_open_zones /
+		f->io_size;
 }
 
 /*