projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d757584
)
Bail out if glfs_creat failed
author
Tiziano Müller
<tiziano.mueller@stepping-stone.ch>
Thu, 3 Jul 2014 16:22:29 +0000
(18:22 +0200)
committer
Jens Axboe
<axboe@fb.com>
Thu, 3 Jul 2014 16:48:10 +0000
(10:48 -0600)
Otherwise we will get segfaults from gfapi when it tries to access the
invalid fd.
Signed-off-by: Jens Axboe <axboe@fb.com>
engines/glusterfs.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/glusterfs.c
b/engines/glusterfs.c
index 94daab5a2936a0052ed6fb8f3a3b11b068c76358..a64c687f8264db9c9e470a1779cd18840ce78902 100644
(file)
--- a/
engines/glusterfs.c
+++ b/
engines/glusterfs.c
@@
-160,8
+160,9
@@
int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
flags & O_RDONLY ? "ro" : "rw", td_read(td) ? "read" : "write");
g->fd = glfs_creat(g->fs, f->file_name, flags, 0644);
if (!g->fd) {
- log_err("glfs_creat failed.\n");
ret = errno;
+ log_err("glfs_creat failed.\n");
+ return ret;
}
/* file for read doesn't exist or shorter than required, create/extend it */
if (td_read(td)) {