Re: io_u_log_error ddir name mismatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux