git.samba.org
/
tridge
/
dbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fsync directory on file creation if sync_dirs set
[tridge/dbench.git]
/
fileio.c
diff --git
a/fileio.c
b/fileio.c
index 9b3159edfb2a4710e9922cef524beb268ae7120e..f3ed779214789d43ce339cc4a9ce265ea5269894 100644
(file)
--- a/
fileio.c
+++ b/
fileio.c
@@
-310,6
+310,9
@@
static void fio_createx(struct dbench_op *op)
fstat(fd, &st);
+ if (options.sync_dirs && (flags & O_CREAT))
+ fsync(fd);
+
if (!S_ISDIR(st.st_mode)) {
xattr_fd_write_hook(op->child, fd);
}