Skip to content

Commit d08dbc0

Browse files
committed
Merge branch 'Fix_Assert_TdIoQueue_Serialize_Overlap_Offload' of https://github.com/horshack-dpreview/fio
* 'Fix_Assert_TdIoQueue_Serialize_Overlap_Offload' of https://github.com/horshack-dpreview/fio: ioengines.c:346: td_io_queue: Assertion `res == 0' failed Signed-off-by: Jens Axboe <[email protected]>
2 parents e125d0f + d5a4744 commit d08dbc0

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

io_u.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ enum {
2121
IO_U_F_TRIMMED = 1 << 5,
2222
IO_U_F_BARRIER = 1 << 6,
2323
IO_U_F_VER_LIST = 1 << 7,
24-
IO_U_F_PATTERN_DONE = 1 << 8,
24+
IO_U_F_PATTERN_DONE = 1 << 8,
25+
IO_U_F_OVERLAP_LOCK = 1 << 9,
2526
};
2627

2728
/*

ioengines.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,10 @@ enum fio_q_status td_io_queue(struct thread_data *td, struct io_u *io_u)
341341
* started the overlap check because the IO_U_F_FLIGHT
342342
* flag is now set
343343
*/
344-
if (td_offload_overlap(td)) {
344+
if (io_u->flags & IO_U_F_OVERLAP_LOCK) {
345345
int res = pthread_mutex_unlock(&overlap_check);
346346
assert(res == 0);
347+
io_u_clear(td, io_u, IO_U_F_OVERLAP_LOCK);
347348
}
348349

349350
assert(fio_file_open(io_u->file));

rate-submit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static void check_overlap(struct io_u *io_u)
4747
assert(res == 0);
4848
goto retry;
4949
}
50+
io_u_set(td, io_u, IO_U_F_OVERLAP_LOCK);
5051
}
5152

5253
static int io_workqueue_fn(struct submit_worker *sw,

0 commit comments

Comments
 (0)