[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1714-g46882ad

Volker Lendecke vl at samba.org
Wed Jan 30 10:40:13 GMT 2008


The branch, v3-2-test has been updated
       via  46882ad9927c95caadeb7fb03c1d7491bbe1fb22 (commit)
      from  6bbe0fde6ebb5c1ea00ea24d3bdbffbf6f246bd6 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 46882ad9927c95caadeb7fb03c1d7491bbe1fb22
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Jan 30 11:11:27 2008 +0100

    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!

-----------------------------------------------------------------------

Summary of changes:
 source/smbd/aio.c   |    6 ++++--
 source/smbd/reply.c |   11 ++---------
 2 files changed, 6 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/smbd/aio.c b/source/smbd/aio.c
index 9c25f69..86fdfe3 100644
--- a/source/smbd/aio.c
+++ b/source/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",
diff --git a/source/smbd/reply.c b/source/smbd/reply.c
index 4ea81a3..1837603 100644
--- a/source/smbd/reply.c
+++ b/source/smbd/reply.c
@@ -3338,11 +3338,7 @@ void reply_read_and_X(struct smb_request *req)
 		return;
 	}
 
-	/* It is possible for VFS modules to selectively decide whether Async I/O should be used
-	   for the file or not.
-        */
-	if ((SMB_VFS_AIO_FORCE(fsp)) &&
-	    !big_readX &&
+	if (!big_readX &&
 	    schedule_aio_read_and_X(conn, req, fsp, startpos, smb_maxcnt)) {
 		END_PROFILE(SMBreadX);
 		return;
@@ -4012,10 +4008,7 @@ void reply_write_and_X(struct smb_request *req)
 		nwritten = 0;
 	} else {
 
-		/* It is possible for VFS modules to selectively decide whether Async I/O
-		   should be used for the file or not.
-		*/
-		if ((SMB_VFS_AIO_FORCE(fsp)) && (req->unread_bytes == 0) &&
+		if ((req->unread_bytes == 0) &&
 		    schedule_aio_write_and_X(conn, req, fsp, data, startpos,
 					     numtowrite)) {
 			END_PROFILE(SMBwriteX);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list