The Samba-Bugzilla – Attachment 9512 Details for
Bug 10310
Fix AIO with SMB2 and locks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for 4.1 branch
v4-1-patches (text/plain), 6.21 KB, created by
Christof Schmitt
on 2013-12-06 16:25:57 UTC
(
hide
)
Description:
Patches for 4.1 branch
Filename:
MIME Type:
Creator:
Christof Schmitt
Created:
2013-12-06 16:25:57 UTC
Size:
6.21 KB
patch
obsolete
>From 120601bfaf6f7c53b492368cc98195b31606844c Mon Sep 17 00:00:00 2001 >From: Christof Schmitt <cs@samba.org> >Date: Thu, 5 Dec 2013 15:57:54 -0700 >Subject: [PATCH 1/5] 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@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit dfef0701c398982226dde8a8e15ff97bba0fef53) >--- > source3/smbd/aio.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > >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); > >-- >1.7.1 > > >From 9e9dc8d2126d6830f7374f6acf5de71f240bfa3c Mon Sep 17 00:00:00 2001 >From: Christof Schmitt <cs@samba.org> >Date: Thu, 5 Dec 2013 16:20:26 -0700 >Subject: [PATCH 2/5] 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@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit eadb2a54d1733a482999eb770182156dad1e184d) >--- > source3/smbd/smb2_read.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c >index 41adb03..8a9a670 100644 >--- a/source3/smbd/smb2_read.c >+++ b/source3/smbd/smb2_read.c >@@ -462,7 +462,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); > } > >-- >1.7.1 > > >From e6f9317f2e983043869160c3aae1ceade2cd1426 Mon Sep 17 00:00:00 2001 >From: Christof Schmitt <cs@samba.org> >Date: Thu, 5 Dec 2013 15:20:06 -0700 >Subject: [PATCH 3/5] selftest: Introduce share for testing AIO > >Signed-off-by: Christof Schmitt <cs@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 63727c15450e1db2be49ade758c369aa4599657a) >--- > selftest/target/Samba3.pm | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm >index 26f5e92..9a6c86f 100755 >--- a/selftest/target/Samba3.pm >+++ b/selftest/target/Samba3.pm >@@ -1105,6 +1105,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 >-- >1.7.1 > > >From 64cd7ab8518356ed38ac6528cee29e8a46375b82 Mon Sep 17 00:00:00 2001 >From: Christof Schmitt <cs@samba.org> >Date: Thu, 5 Dec 2013 15:22:13 -0700 >Subject: [PATCH 4/5] selftest: Run smb2.lock tests also against AIO share > >Signed-off-by: Christof Schmitt <cs@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit d551d5256f9b1ca57b8018d816ea665c9b847ced) >--- > source3/selftest/tests.py | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py >index e5ae63e..31a1b67 100755 >--- a/source3/selftest/tests.py >+++ b/source3/selftest/tests.py >@@ -349,6 +349,10 @@ for t in tests: > plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_simple -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-simple') > plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/nfs4acl_special -U$USERNAME%$PASSWORD', description='nfs4acl_xattr-special') > plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmpcase -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') >-- >1.7.1 > > >From f9d4824726c7ef81698e583e24b2d836f7aac860 Mon Sep 17 00:00:00 2001 >From: Christof Schmitt <cs@samba.org> >Date: Thu, 5 Dec 2013 15:53:47 -0700 >Subject: [PATCH 5/5] 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@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Dec 6 05:19:37 CET 2013 on sn-devel-104 >(cherry picked from commit 8c3bf7b84950fbb0305bcccd49ecfc202e08901a) >--- > selftest/flapping | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > >diff --git a/selftest/flapping b/selftest/flapping >index afeae65..fd2e0c3 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 >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 10310
:
9511
| 9512