Too small arrays for file names
authorVasily Tarasov <tarasov@vasily.name>
Mon, 27 Feb 2012 07:21:11 +0000 (08:21 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Feb 2012 07:21:11 +0000 (08:21 +0100)
commitc3ce73f5a414900c5c4817cf2fa1eeb7837f17b8
tree073ae4700efab6c78697bc86175e63a4005d2777
parentf6d38abde41a7b18808dcdab393f05d6300d16c3
Too small arrays for file names

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>
blkparse.c
blktrace.h