Skip to content
Discussion options

You must be logged in to vote

io_u.c:get_io_u() has the information you are looking for:

struct io_u *get_io_u(struct thread_data *td)
{
...
	/*
	 * If using an iolog, grab next piece if any available.
	 */
	if (td->flags & TD_F_READ_IOLOG) {
		if (read_iolog_get(td, io_u))
			goto err_put;
	} else if (set_io_u_file(td, io_u)) {
		ret = -EBUSY;
		dprint(FD_IO, "io_u %p, setting file failed\n", io_u);
		goto err_put;
	}

	f = io_u->file;
	if (!f) {
		dprint(FD_IO, "io_u %p, setting file failed\n", io_u);
		goto err_put;
	}

...

out:
	assert(io_u->file);
	if (!td_io_prep(td, io_u)) {
		if (!td->o.disable_lat)
			fio_gettime(&io_u->start_time, NULL);

		if (do_scramble)
			small_content_scramble(io_u);

		return io_u;
	}

Replies: 6 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@raj-prince
Comment options

Comment options

You must be logged in to vote
1 reply
@raj-prince
Comment options

Answer selected by sitsofe
Comment options

You must be logged in to vote
5 replies
@raj-prince
Comment options

@vincentkfu
Comment options

@raj-prince
Comment options

@raj-prince
Comment options

@vincentkfu
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants