Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: io_u_log_error ddir name mismatch
Date: Tue, 16 Sep 2014 20:09:52 -0600	[thread overview]
Message-ID: <5418ED70.7030109@kernel.dk> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B402958C8469C@G9W0745.americas.hpqcorp.net>

On 2014-09-16 16:24, Elliott, Robert (Server Storage) wrote:
> The names in io_u_log_error:
>         const char *msg[] = { "read", "write", "sync", "datasync",
>                                 "sync_file_range", "wait", "trim" };
>
> which are printed with
> 	log_err (msg[io_u->ddir]);
>
> don't match the enum values for io_u->ddir:
>
> enum fio_ddir {
>          DDIR_READ = 0,
>          DDIR_WRITE = 1,
>          DDIR_TRIM = 2,
>          DDIR_RWDIR_CNT = 3,
>          DDIR_SYNC = 3,
>          DDIR_DATASYNC,
>          DDIR_SYNC_FILE_RANGE,
>          DDIR_WAIT,
>          DDIR_INVAL = -1,
> };
>
> struct io_u {
>          enum fio_ddir ddir;
> ...
>
> Maybe TRIM was moved earlier at some point?

TRIM was turned into a first class citizen at one point, I suspect that 
is when it broke. It's broken in both io_u.c and iolog.c. I fixed it by 
killing them both, and adding a function for this right in io_ddir.h 
where the data directions are defined.

Thanks Robert!

-- 
Jens Axboe



      reply	other threads:[~2014-09-17  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 22:24 io_u_log_error ddir name mismatch Elliott, Robert (Server Storage)
2014-09-17  2:09 ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5418ED70.7030109@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Elliott@hp.com \
    --cc=fio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox