- if (!get_next_offset(td, f, &io_u->offset, io_u->ddir)) {
- io_u->buflen = get_next_buflen(td, io_u->ddir);
- if (io_u->buflen) {
- /*
- * If using a write iolog, store this entry.
- */
- if (td->write_iolog_file)
- write_iolog_put(td, io_u);
-
- io_u->file = f;
- return 0;
- }
+ if (get_next_offset(td, f, io_u))
+ return 1;
+
+ io_u->buflen = get_next_buflen(td, f, io_u);
+ if (!io_u->buflen)
+ return 1;
+
+ /*
+ * mark entry before potentially trimming io_u
+ */
+ if (!td->read_iolog && !td->sequential && !td->norandommap)
+ mark_random_map(td, f, io_u);
+
+ /*
+ * If using a write iolog, store this entry.
+ */
+ if (td->write_iolog_file)
+ write_iolog_put(td, io_u);
+
+ io_u->file = f;
+ return 0;
+}
+
+static void io_u_mark_depth(struct thread_data *td)
+{
+ int index = 0;
+
+ switch (td->cur_depth) {
+ default:
+ index++;
+ case 32 ... 63:
+ index++;
+ case 16 ... 31:
+ index++;
+ case 8 ... 15:
+ index++;
+ case 4 ... 7:
+ index++;
+ case 2 ... 3:
+ index++;
+ case 1:
+ break;