summaryrefslogtreecommitdiffstats
path: root/source3/smbd/aio.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-30 11:11:27 +0100
committerVolker Lendecke <vl@samba.org>2008-01-30 11:12:10 +0100
commit34a92c6285513acff08c7c9ad67474243559fd2f (patch)
treebbf52380eb42714a591cc9469df9235895218b00 /source3/smbd/aio.c
parentaf92bf934ed7614ab0aa41015e296924823a0a5f (diff)
downloadsamba-34a92c6285513acff08c7c9ad67474243559fd2f.tar.gz
samba-34a92c6285513acff08c7c9ad67474243559fd2f.tar.xz
samba-34a92c6285513acff08c7c9ad67474243559fd2f.zip
Re-enable async I/O for non-TSM systems
The logic was wrong: A "SMB_VFS_AIO_FORCE()==False" disabled async I/O, whereas a "SMB_VFS_AIO_FORCE()==True" should enforce it regardless of other settings. Alexander, please check! (This used to be commit 46882ad9927c95caadeb7fb03c1d7491bbe1fb22)
Diffstat (limited to 'source3/smbd/aio.c')
-rw-r--r--source3/smbd/aio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 9c25f69c975..86fdfe31b71 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -202,7 +202,8 @@ bool schedule_aio_read_and_X(connection_struct *conn,
size_t bufsize;
size_t min_aio_read_size = lp_aio_read_size(SNUM(conn));
- if (!min_aio_read_size || (smb_maxcnt < min_aio_read_size)) {
+ if ((!min_aio_read_size || (smb_maxcnt < min_aio_read_size))
+ && !SMB_VFS_AIO_FORCE(fsp)) {
/* Too small a read for aio request. */
DEBUG(10,("schedule_aio_read_and_X: read size (%u) too small "
"for minimum aio_read of %u\n",
@@ -284,7 +285,8 @@ bool schedule_aio_write_and_X(connection_struct *conn,
bool write_through = BITSETW(req->inbuf+smb_vwv7,0);
size_t min_aio_write_size = lp_aio_write_size(SNUM(conn));
- if (!min_aio_write_size || (numtowrite < min_aio_write_size)) {
+ if ((!min_aio_write_size || (numtowrite < min_aio_write_size))
+ && !SMB_VFS_AIO_FORCE(fsp)) {
/* Too small a write for aio request. */
DEBUG(10,("schedule_aio_write_and_X: write size (%u) too "
"small for minimum aio_write of %u\n",