fix re-open failure issue when using gluster ioengine
authorrootfs <hchen@redhat.com>
Tue, 19 Aug 2014 18:42:45 +0000 (14:42 -0400)
committerrootfs <hchen@redhat.com>
Tue, 19 Aug 2014 18:42:45 +0000 (14:42 -0400)
Signed-off-by: rootfs <hchen@redhat.com>
engines/glusterfs.c
examples/gfapi.fio [new file with mode: 0644]

index 52006b04075ab26f46bae54973d34e29dd92d096..52df9e8a0608f2d73b89a70c962a52cfe79abd63 100644 (file)
@@ -260,7 +260,7 @@ int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
        dprint(FD_FILE, "fio %p created %s\n", g->fs, f->file_name);
        f->fd = -1;
        f->shadow_fd = -1;
-
+       td->o.open_files ++;
        return ret;
 }
 
diff --git a/examples/gfapi.fio b/examples/gfapi.fio
new file mode 100644 (file)
index 0000000..ccc8123
--- /dev/null
@@ -0,0 +1,16 @@
+# Test opening a file from multiple jobs.
+# Originally authored by Castor Fu
+[global]
+ioengine=gfapi
+volume=vol
+brick=localhost
+create_on_open=1
+rw=write
+
+[reopen_file_test]
+nrfiles=4
+filesize=16k
+size=64k
+openfiles=2
+rw=write
+filename_format=reopen_test.$filenum