summaryrefslogtreecommitdiffstats
path: root/source3/smbd/aio.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-07-12 10:57:47 -0700
committerJeremy Allison <jra@samba.org>2012-07-12 22:46:07 +0200
commitcb405947caa9f4bdb962483860a9093a364ecbf2 (patch)
tree81c87068f7576a457650e07ff37a5fd537d31c20 /source3/smbd/aio.c
parent622eb59eb472bbdb9fd985c4d8880d3a1c098cd7 (diff)
downloadsamba-cb405947caa9f4bdb962483860a9093a364ecbf2.tar.gz
samba-cb405947caa9f4bdb962483860a9093a364ecbf2.tar.xz
samba-cb405947caa9f4bdb962483860a9093a364ecbf2.zip
Add an optimization to pthread aio writes to also do fsync if requested.
Should help by ensuring complete writes done in sub-thread, not in the main thread.
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r--source3/smbd/aio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 0ea5274420..569741c747 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -53,6 +53,15 @@ struct aio_extra {
};
/****************************************************************************
+ Accessor function to return write_through state.
+*****************************************************************************/
+
+bool aio_write_through_requested(struct aio_extra *aio_ex)
+{
+ return aio_ex->write_through;
+}
+
+/****************************************************************************
Initialize the signal handler for aio read/write.
*****************************************************************************/