In our experiments blktrace/blkparse file names encode a lot of
infomation about the particular experiment. We noticed that for long
enough file names blkparse does not work.
The reason is that per_cpu_info->fname[] is of 128 bytes. As a result,
in setup_file() function only part of the file name gets to ->fname[].
Then stat() fails and we exit the function. Notice, that no error is
printed in this case.
In the following patch ->fname[] size is increased to POSIX defined
PATH_MAX.
Signed-off-by: Vasily Tarasov <tarasov@vasily.name
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ofp = fdopen(STDOUT_FILENO, "w");
mode = _IOLBF;
} else {
ofp = fdopen(STDOUT_FILENO, "w");
mode = _IOLBF;
} else {
snprintf(ofname, sizeof(ofname) - 1, "%s", output_name);
ofp = fopen(ofname, "w");
snprintf(ofname, sizeof(ofname) - 1, "%s", output_name);
ofp = fopen(ofname, "w");
#define BLKTRACE_H
#include <stdio.h>
#define BLKTRACE_H
#include <stdio.h>
#include <byteswap.h>
#include <endian.h>
#include <byteswap.h>
#include <endian.h>
struct io_stats io_stats;
struct io_stats io_stats;