From cb405947caa9f4bdb962483860a9093a364ecbf2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 12 Jul 2012 10:57:47 -0700 Subject: 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. --- source3/smbd/aio.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/smbd/aio.c') 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 @@ -52,6 +52,15 @@ struct aio_extra { int (*handle_completion)(struct aio_extra *ex, int errcode); }; +/**************************************************************************** + 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. *****************************************************************************/ -- cgit