summaryrefslogtreecommitdiff
path: root/filelock.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-04-02 15:46:58 -0600
committerJens Axboe <axboe@fb.com>2014-04-02 15:46:58 -0600
commit243bfe190245a10e9d0981bf2a7c722edc4c43d4 (patch)
tree3fae4c737731b1be9d1fcdc4872db247308cac65 /filelock.h
parent3d434057fd4c20c2b1216d9696c4fed9f7d8c4dd (diff)
downloadfio-243bfe190245a10e9d0981bf2a7c722edc4c43d4.tar.gz
fio-243bfe190245a10e9d0981bf2a7c722edc4c43d4.tar.bz2
iolog: don't serialize the writing of all logs
Serialize based on filename, so that independent logs can be written at the same time. If the logs are big, this can take a while to flush to disk. It's silly to have all jobs waiting on each other, when they could write their own logs independently. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'filelock.h')
-rw-r--r--filelock.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/filelock.h b/filelock.h
new file mode 100644
index 00000000..97d13b7a
--- /dev/null
+++ b/filelock.h
@@ -0,0 +1,11 @@
+#ifndef FIO_LOCK_FILE_H
+#define FIO_LOCK_FILE_H
+
+extern void fio_lock_file(const char *);
+extern int fio_trylock_file(const char *);
+extern void fio_unlock_file(const char *);
+
+extern int fio_filelock_init(void);
+extern void fio_filelock_exit(void);
+
+#endif