[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Dec 5 21:20:03 MST 2013


The branch, master has been updated
       via  8c3bf7b selftest: Remove samba3.smb2.lock.*.rw-exclusive from flapping file
       via  d551d52 selftest: Run smb2.lock tests also against AIO share
       via  63727c1 selftest: Introduce share for testing AIO
       via  eadb2a5 s3: Return correct error code from SMB2 AIO read failure
       via  dfef070 s3-aio: Use correct locking context for SMB2
      from  30231b2 s3-torture: Call cli_flush().

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8c3bf7b84950fbb0305bcccd49ecfc202e08901a
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 15:53:47 2013 -0700

    selftest: Remove samba3.smb2.lock.*.rw-exclusive from flapping file
    
    This test demonstrates a problem with byte range locks and AIO.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Fri Dec  6 05:19:37 CET 2013 on sn-devel-104

commit d551d5256f9b1ca57b8018d816ea665c9b847ced
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 15:22:13 2013 -0700

    selftest: Run smb2.lock tests also against AIO share
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 63727c15450e1db2be49ade758c369aa4599657a
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 15:20:06 2013 -0700

    selftest: Introduce share for testing AIO
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit eadb2a54d1733a482999eb770182156dad1e184d
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 16:20:26 2013 -0700

    s3: Return correct error code from SMB2 AIO read failure
    
    This is similar to commit 27e20d5d60ea8aa526bcb7c2dfc18dd2de0bb97b which
    fixed the same case for SMB2 writes: When sending the AIO read fails,
    return the real error instead of mapping it to NT_STATUS_FILE_CLOSED.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit dfef0701c398982226dde8a8e15ff97bba0fef53
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Dec 5 15:57:54 2013 -0700

    s3-aio: Use correct locking context for SMB2
    
    The synchronous SMB2 reads and writes use open_persistent_id. The AIO
    codepathes have to use the same, otherwise a write will conflict with a
    lock on the same open file.
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

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

Summary of changes:
 selftest/flapping         |    1 -
 selftest/target/Samba3.pm |    4 ++++
 source3/selftest/tests.py |    4 ++++
 source3/smbd/aio.c        |    4 ++--
 source3/smbd/smb2_read.c  |    2 +-
 5 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/flapping b/selftest/flapping
index d939650..e41c65d 100644
--- a/selftest/flapping
+++ b/selftest/flapping
@@ -16,7 +16,6 @@
 ^samba3.rap.printing # fails sometimes on sn-devel
 ^samba3.rpc.spoolss.printer.*addprinter.print_test # fails on some hosts due to timing issues ?
 ^samba3.rpc.lsa.privileges.lsa.Privileges\(s3dc\) # fails sometimes on sn-devel
-^samba3.smb2.lock.*.rw-exclusive # another intermittent failure
 ^samba4.blackbox.gentest # is flakey due to timing
 ^samba3.smb2.acls.INHERITANCE\(plugin_s4_dc\)  # Seems to flap - succeeds on sn-devel, fails on Fedora 16
 ^samba3.smb2.acls.DYNAMIC\(plugin_s4_dc\)  # Seems to flap - succeeds on sn-devel, fails on Fedora 16
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index ebfabf6..e4a2417 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1131,6 +1131,10 @@ sub provision($$$$$$)
 	directory mask = 0777
 	force directory mode = 0
 	vfs objects = xattr_tdb
+[aio]
+	copy = tmp
+	aio read size = 1
+	aio write size = 1
 
 [print\$]
 	copy = tmp
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index df88f9d..b642585 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -355,6 +355,10 @@ for t in tests:
         plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/fs_specific -U$USERNAME%$PASSWORD', 'fs_specific')
         plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
         plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
+    elif t == "smb2.lock":
+        plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/aio -U$USERNAME%$PASSWORD', 'aio')
+        plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
+        plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
     else:
         plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
         plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 24a822e..eec29f6 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -720,7 +720,7 @@ NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid,
+	init_strict_lock_struct(fsp, fsp->op->global->open_persistent_id,
 		(uint64_t)startpos, (uint64_t)smb_maxcnt, READ_LOCK,
 		&aio_ex->lock);
 
@@ -872,7 +872,7 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
 
 	aio_ex->write_through = write_through;
 
-	init_strict_lock_struct(fsp, (uint64_t)smbreq->smbpid,
+	init_strict_lock_struct(fsp, fsp->op->global->open_persistent_id,
 		in_offset, (uint64_t)in_data.length, WRITE_LOCK,
 		&aio_ex->lock);
 
diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c
index d6d3d90..6478326 100644
--- a/source3/smbd/smb2_read.c
+++ b/source3/smbd/smb2_read.c
@@ -464,7 +464,7 @@ static struct tevent_req *smbd_smb2_read_send(TALLOC_CTX *mem_ctx,
 
 	if (!NT_STATUS_EQUAL(status, NT_STATUS_RETRY)) {
 		/* Real error in setting up aio. Fail. */
-		tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
+		tevent_req_nterror(req, status);
 		return tevent_req_post(req, ev);
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list