From b53f2c545d8335380b507bd7281178c25d27ddf0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 8 Apr 2014 21:07:12 -0600 Subject: [PATCH] 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 --- blktrace.c | 1 + engines/net.c | 1 + engines/rbd.c | 1 + 3 files changed, 3 insertions(+) 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; -- 2.25.1