diff options
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r-- | xlators/storage/posix/src/posix.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 22340370e2c..c834b29d90e 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -43,6 +43,7 @@ #include "timer.h" #include "posix-mem-types.h" #include "posix-handle.h" +#include "call-stub.h" #ifdef HAVE_LIBAIO #include <libaio.h> @@ -128,6 +129,22 @@ struct posix_private { /* node-uuid in pathinfo xattr */ gf_boolean_t node_uuid_pathinfo; + pthread_t fsyncer; + struct list_head fsyncs; + pthread_mutex_t fsync_mutex; + pthread_cond_t fsync_cond; + int fsync_queue_count; + + enum { + BATCH_NONE = 0, + BATCH_SYNCFS, + BATCH_SYNCFS_SINGLE_FSYNC, + BATCH_REVERSE_FSYNC, + BATCH_SYNCFS_REVERSE_FSYNC + } batch_fsync_mode; + + uint32_t batch_fsync_delay_usec; + /* seconds to sleep between health checks */ uint32_t health_check_interval; pthread_t health_check; @@ -184,4 +201,6 @@ void __posix_fd_set_odirect (fd_t *fd, struct posix_fd *pfd, int opflags, off_t offset, size_t size); void posix_spawn_health_check_thread (xlator_t *this); + +void *posix_fsyncer (void *); #endif /* _POSIX_H */ |