projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
io_u: re-invalidate cache when looping around without file open/close
[fio.git]
/
engines
/
glusterfs.c
diff --git
a/engines/glusterfs.c
b/engines/glusterfs.c
index 507cd25dc89d0c638193134d0543b0670da0ed50..981dfa35e03783b6a4c06b4441da9297f21186ea 100644
(file)
--- a/
engines/glusterfs.c
+++ b/
engines/glusterfs.c
@@
-6,6
+6,7
@@
*/
#include "gfapi.h"
*/
#include "gfapi.h"
+#include "../optgroup.h"
struct fio_option gfapi_options[] = {
{
struct fio_option gfapi_options[] = {
{
@@
-40,7
+41,7
@@
int fio_gf_setup(struct thread_data *td)
dprint(FD_IO, "fio setup\n");
dprint(FD_IO, "fio setup\n");
- if (td->io_ops
->
data)
+ if (td->io_ops
_
data)
return 0;
g = malloc(sizeof(struct gf_data));
return 0;
g = malloc(sizeof(struct gf_data));
@@
-76,19
+77,19
@@
int fio_gf_setup(struct thread_data *td)
goto cleanup;
}
dprint(FD_FILE, "fio setup %p\n", g->fs);
goto cleanup;
}
dprint(FD_FILE, "fio setup %p\n", g->fs);
- td->io_ops
->
data = g;
+ td->io_ops
_
data = g;
return 0;
cleanup:
if (g->fs)
glfs_fini(g->fs);
free(g);
return 0;
cleanup:
if (g->fs)
glfs_fini(g->fs);
free(g);
- td->io_ops
->
data = NULL;
+ td->io_ops
_
data = NULL;
return r;
}
void fio_gf_cleanup(struct thread_data *td)
{
return r;
}
void fio_gf_cleanup(struct thread_data *td)
{
- struct gf_data *g = td->io_ops
->
data;
+ struct gf_data *g = td->io_ops
_
data;
if (g) {
if (g->aio_events)
if (g) {
if (g->aio_events)
@@
-98,7
+99,7
@@
void fio_gf_cleanup(struct thread_data *td)
if (g->fs)
glfs_fini(g->fs);
free(g);
if (g->fs)
glfs_fini(g->fs);
free(g);
- td->io_ops
->
data = NULL;
+ td->io_ops
_
data = NULL;
}
}
}
}
@@
-106,7
+107,7
@@
int fio_gf_get_file_size(struct thread_data *td, struct fio_file *f)
{
struct stat buf;
int ret;
{
struct stat buf;
int ret;
- struct gf_data *g = td->io_ops
->
data;
+ struct gf_data *g = td->io_ops
_
data;
dprint(FD_FILE, "get file size %s\n", f->file_name);
dprint(FD_FILE, "get file size %s\n", f->file_name);
@@
-134,7
+135,7
@@
int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
int flags = 0;
int ret = 0;
int flags = 0;
int ret = 0;
- struct gf_data *g = td->io_ops
->
data;
+ struct gf_data *g = td->io_ops
_
data;
struct stat sb = { 0, };
if (td_write(td)) {
struct stat sb = { 0, };
if (td_write(td)) {
@@
-164,11
+165,11
@@
int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
if (td_read(td)) {
if (glfs_lstat(g->fs, f->file_name, &sb)
|| sb.st_size < f->real_file_size) {
if (td_read(td)) {
if (glfs_lstat(g->fs, f->file_name, &sb)
|| sb.st_size < f->real_file_size) {
- dprint(FD_FILE, "fio extend file %s from %
ld to %ld
\n",
- f->file_name, sb.st_size, f->real_file_size);
+ dprint(FD_FILE, "fio extend file %s from %
jd to %" PRIu64 "
\n",
+ f->file_name,
(intmax_t)
sb.st_size, f->real_file_size);
ret = glfs_ftruncate(g->fd, f->real_file_size);
if (ret) {
ret = glfs_ftruncate(g->fd, f->real_file_size);
if (ret) {
- log_err("failed fio extend file %s to %
ld
\n",
+ log_err("failed fio extend file %s to %
" PRIu64 "
\n",
f->file_name, f->real_file_size);
} else {
unsigned long long left;
f->file_name, f->real_file_size);
} else {
unsigned long long left;
@@
-189,7
+190,7
@@
int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
r = glfs_write(g->fd, b, bs, 0);
dprint(FD_IO,
r = glfs_write(g->fd, b, bs, 0);
dprint(FD_IO,
- "fio write %d of %
ld
file %s\n",
+ "fio write %d of %
" PRIu64 "
file %s\n",
r, f->real_file_size,
f->file_name);
r, f->real_file_size,
f->file_name);
@@
-267,7
+268,7
@@
int fio_gf_open_file(struct thread_data *td, struct fio_file *f)
int fio_gf_close_file(struct thread_data *td, struct fio_file *f)
{
int ret = 0;
int fio_gf_close_file(struct thread_data *td, struct fio_file *f)
{
int ret = 0;
- struct gf_data *g = td->io_ops
->
data;
+ struct gf_data *g = td->io_ops
_
data;
dprint(FD_FILE, "fd close %s\n", f->file_name);
dprint(FD_FILE, "fd close %s\n", f->file_name);
@@
-283,7
+284,7
@@
int fio_gf_close_file(struct thread_data *td, struct fio_file *f)
int fio_gf_unlink_file(struct thread_data *td, struct fio_file *f)
{
int ret = 0;
int fio_gf_unlink_file(struct thread_data *td, struct fio_file *f)
{
int ret = 0;
- struct gf_data *g = td->io_ops
->
data;
+ struct gf_data *g = td->io_ops
_
data;
dprint(FD_FILE, "fd unlink %s\n", f->file_name);
dprint(FD_FILE, "fd unlink %s\n", f->file_name);
@@
-299,7
+300,7
@@
int fio_gf_unlink_file(struct thread_data *td, struct fio_file *f)
g->fd = NULL;
free(g);
}
g->fd = NULL;
free(g);
}
- td->io_ops
->
data = NULL;
+ td->io_ops
_
data = NULL;
return ret;
}
return ret;
}