From: Jens Axboe Date: Wed, 9 Apr 2014 03:07:12 +0000 (-0600) Subject: Increment open file count manually X-Git-Tag: fio-2.1.8~5^2~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b53f2c545d8335380b507bd7281178c25d27ddf0;p=fio.git Increment open file count manually For engines/logs that manually add files, be sure to increment the open file count. Signed-off-by: Jens Axboe --- diff --git a/blktrace.c b/blktrace.c index 649cb83e..52f0c719 100644 --- a/blktrace.c +++ b/blktrace.c @@ -217,6 +217,7 @@ static int trace_add_file(struct thread_data *td, __u32 device) dprint(FD_BLKTRACE, "add devices %s\n", dev); fileno = add_file_exclusive(td, dev); + td->o.open_files++; td->files[fileno]->major = maj; td->files[fileno]->minor = min; trace_add_open_close_event(td, fileno, FIO_LOG_OPEN_FILE); diff --git a/engines/net.c b/engines/net.c index 110e158f..fcf4b898 100644 --- a/engines/net.c +++ b/engines/net.c @@ -1196,6 +1196,7 @@ static int fio_netio_setup(struct thread_data *td) if (!td->files_index) { add_file(td, td->o.filename ?: "net", 0, 0); td->o.nr_files = td->o.nr_files ?: 1; + td->o.open_files++; } if (!td->io_ops->data) { diff --git a/engines/rbd.c b/engines/rbd.c index 9d64efd2..ff353737 100644 --- a/engines/rbd.c +++ b/engines/rbd.c @@ -379,6 +379,7 @@ static int fio_rbd_setup(struct thread_data *td) if (!td->files_index) { add_file(td, td->o.filename ? : "rbd", 0, 0); td->o.nr_files = td->o.nr_files ? : 1; + td->o.open_files++; } f = td->files[0]; f->real_file_size = info.size;