net engine: fix potential buffer overrun in socket path
[fio.git] / engines / rbd.c
index d089a41d35fa1de5ff1d1eef983caa505cd27343..ff35373795af68eaf357043851c6fe2c1c550fab 100644 (file)
@@ -377,8 +377,9 @@ static int fio_rbd_setup(struct thread_data *td)
         * The size of the RBD is set instead of a artificial file.
         */
        if (!td->files_index) {
-               add_file(td, td->o.filename ? : "rbd");
+               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;
@@ -422,7 +423,7 @@ static int fio_rbd_io_u_init(struct thread_data *td, struct io_u *io_u)
        return 0;
 }
 
-struct ioengine_ops ioengine = {
+static struct ioengine_ops ioengine = {
        .name               = "rbd",
        .version            = FIO_IOOPS_VERSION,
        .setup              = fio_rbd_setup,