Fix crash with group_reporting and one group member that never started
authorJens Axboe <axboe@fb.com>
Tue, 29 Mar 2016 14:28:56 +0000 (08:28 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 29 Mar 2016 14:28:56 +0000 (08:28 -0600)
commitdedb88eb2e4f074fd969133dbdc38ef3be64800b
treecf2ad247c0c5c5e1cece824338da2d298bb292ff
parent53280a1dc785ef0447aa5cf8e32e899ecfc22978
Fix crash with group_reporting and one group member that never started

If we have a job that nevers gets started, then we crash in
setting up the group stats, if group_reporting is enabled. This
can be reproduced like this:

fio --name=iwontstart --name=null --ioengine=null --size=1g --group_reporting=1
Starting 2 processes
iwontstart: you need to specify size=
fio: pid=0, err=22/file:filesetup.c:828, func=total_file_size, error=Invalid argument
Segmentation fault (core dumped)

Check for -1 groupid, and just skip the job if so.

Signed-off-by: Jens Axboe <axboe@fb.com>
stat.c