Volker Lendecke
a6b5836741
s3-smb2: Postpone close_file until all aio is handled
...
Thanks to Jeremy for this simple idea
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:58:43 -07:00
Volker Lendecke
3e9f58be7e
s3-smb1: Postpone close_file until all aio is handled
...
Thanks to Jeremy for this simple idea
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:57:53 -07:00
Volker Lendecke
3da86cc23f
s3: Add tevent_wait_send/recv
...
To me it seems that we might have this functionality already somewere... I
just can't find it. Metze, do you have an idea?
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:54:20 -07:00
Volker Lendecke
f79fb4429c
s3: Slightly simplify reply_close()
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:54:04 -07:00
Volker Lendecke
730d3e8973
s3: Compile with pthreadpool by default
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:53:50 -07:00
Volker Lendecke
4a9b5cce92
config: The AIO engine is indepent of HAVE_AIO now
...
Compile the basic aio engine always, it works via libasys/pthreadpool_sync
in a sync fashion even if no pthreads are around. Everything else (linux
aio, posix aio, aio fork) is now compiled as modules based on specific
system capabilities
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:53:28 -07:00
Volker Lendecke
d948b1bfee
s3: Add aio_fsync to the aio_linux module
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:52:52 -07:00
Volker Lendecke
d6cb302988
s3: Add aio_fsync to the aio_fork module
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:52:16 -07:00
Volker Lendecke
38dd5b24bb
s3-aio-fork: make "read_cmd" an enum
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:53 -07:00
Volker Lendecke
e3f3c09504
s3: Add aio_fsync to the aio_posix module
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:43 -07:00
Volker Lendecke
ed31e20115
s3-aio: Make the strict sync after write async
...
This restores cb405947caa9f4bdb962483860a9093a364ecbf2, which was
lost during the refactoring of aio.c and vfs_aio_pthread.c.
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:11 -07:00
Volker Lendecke
56aae9f754
s3: Add a _nosync version of smb2_write_complete
...
This will be used in aio.c to avoid a second fsync after write
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:27 -07:00
Volker Lendecke
5d09cec6fe
s3-vfs: async fsync
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:04 -07:00
Volker Lendecke
3882113e6f
s3: Fix the build
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:47:27 -07:00
Volker Lendecke
dc5e3fba48
s3-libasys: Add asys_fsync() implementation
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:47:13 -07:00
Volker Lendecke
fd351b6ebb
s3: Make us survive base-delaywrite with aio enabled
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:54 -07:00
Volker Lendecke
c4efaabbd9
s3: Move the aio_pthread read/write functionality to vfs_default
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:29 -07:00
Volker Lendecke
9dc78c90f3
s3-aio: Remove unused VFS functions and more
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:58 -07:00
Volker Lendecke
be05dad399
s3-vfs: Add pwrite_send/recv to vfs modules
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:14 -07:00
Volker Lendecke
90461aa023
s3-vfs: Add pread_send/recv to vfs modules
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:44:53 -07:00
Volker Lendecke
466839878a
s3: Convert aio_linux to pread/pwrite_send/recv
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:43:17 -07:00
Volker Lendecke
9e1c873a9e
s3: Convert aio_fork to pread/pwrite_send/recv
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:22 -07:00
Volker Lendecke
bf8696fe5d
s3-aio_fork: Convert get_idle_child from NTSTATUS to errno
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:11 -07:00
Volker Lendecke
b65ab9d5a3
s3-aio_fork: Convert create_aio_child from NTSTATUS to errno
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:42:00 -07:00
Volker Lendecke
ff701ceae2
s3: Add vfs_aio_posix
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:41:36 -07:00
Volker Lendecke
f9df073a31
s3: Make smbd/aio.c not depend on aio.h anymore
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:35 -07:00
Volker Lendecke
715653a335
s3:vfs_aio_pthread: Convert to libasys
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:01 -07:00
Volker Lendecke
66eb7bc6ec
s3: Remove the unused completion handling from aio.c
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:38:15 -07:00
Volker Lendecke
f5dc8837d9
s3: Properly handle shutdown with the _send/_recv based aio
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:37:28 -07:00
Volker Lendecke
aff6956d35
s3: Use SMB_VFS_PWRITE_SEND in schedule_smb2_aio_write
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:35:32 -07:00
Volker Lendecke
6df7ba3af9
s3: Use SMB_VFS_PREAD_SEND in schedule_smb2_aio_read
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:34:27 -07:00
Volker Lendecke
2bad405a4e
s3: Use SMB_VFS_PWRITE_SEND in schedule_aio_write_and_X
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:33:22 -07:00
Volker Lendecke
7c32017064
s3: Use SMB_VFS_PREAD_SEND in schedule_aio_read_and_X
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:13:04 -07:00
Volker Lendecke
e24aed15fa
s3-vfs: async pread
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:11:56 -07:00
Volker Lendecke
c6e456d9c0
s3-vfs: async pwrite
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 13:49:21 -07:00
Volker Lendecke
d44ccdd437
libasys
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 13:47:48 -07:00
Alexander Werth
24f7085e4f
s3:Really ignore unknown special ids in NFSv4 ACLs.
...
Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Jul 18 17:45:05 CEST 2012 on sn-devel-104
2012-07-18 17:45:05 +02:00
Christian Ambach
a01a93a1f1
s3:smbstatus add --fast option
...
this option skips all checks if the process for the record is still there
using it gives a huge performance benefit on busy systems and clusters while
it might display stale data if a smbd crashed
2012-07-18 15:49:52 +02:00
Christian Ambach
07412b56bd
s3:smbstatus don't check if process exists twice
...
is_valid_share_mode_entry() already calls serverid_exists which calls process_exists()
2012-07-18 15:49:52 +02:00
Christian Ambach
3643262126
s3:smbstatus rename a function to make its purpose more clear
...
traverse_fn1 does not really intuitively make clear that it is used to traverse connections
2012-07-18 15:49:51 +02:00
Christian Ambach
31f0d304f1
s3:smbstatus fix a compiler warning
...
about comparison of signed with unsigned
2012-07-18 15:49:51 +02:00
Rusty Russell
06731bc28f
source3/netapi: fix only caller which doesn't set up a talloc_stackframe()
...
libnetapi_free() needs a stackframe too; looked like Andrew and Günther
missed this in a37de9a95974c138d264d9cb0c7829bb426bb2d6.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Rusty Russell
d54ebd36cc
source3/passdb/py_passdb.c: wrap all calls in talloc_stackframe()
...
dbwrap needs it. Some calls were already wrapped, but they checked the
talloc_stackframe() return unnecessarily: it can never be NULL.
This is the coccinelle patch I used:
// Add in a stackframe to every function: be sure to free it on (every) return
@rule0@
identifier func;
@@
func(...) {
+TALLOC_CTX *frame = talloc_stackframe();
<...
+talloc_free(frame);
return ...;
...>
}
// Get rid of tframe allocation/frees, replace usage with frame.
@rule1@
identifier func;
identifier oldframe;
@@
func(...) {
...
-TALLOC_CTX *oldframe;
...
-if ((oldframe = talloc_stackframe()) == NULL) {
- ...
-}
<...
-talloc_free(oldframe);
...>
}
// Get rid of tframe (variant 2)
@rule2@
identifier func;
identifier oldframe;
@@
func(...) {
...
-TALLOC_CTX *oldframe;
...
-oldframe = talloc_stackframe();
-if (oldframe == NULL) {
- ...
-}
<...
-talloc_free(oldframe);
...>
}
// Change tframe to frame
@rule3@
identifier func;
@@
func(...) {
<...
-tframe
+frame
...>
}
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Rusty Russell
99272331c6
source3/passdb/py_passdb.c: don't steal from talloc_stackframe().
...
If you want a stack-style allocation, use talloc_stackframe(). If you
don't, don't use it. In particular, talloc_stackframe() here is actually
inside a pool, and stealing from pools is a bad idea.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Rusty Russell
51ec59db10
source3/torture/pdbtest: allocate talloc_stackframe()
...
Avoid talloc_tos() without a stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Rusty Russell
fe72740e82
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
...
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Rusty Russell
c809eec53f
source3/utils/net_conf.c: fix stackframe leak
...
net_conf_wrap_function() doesn't free its stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:09:31 +09:30
Rusty Russell
aa2e02e684
source3/winbindd/winbindd_pam.c: fix stackframe leak
...
check_info3_in_group() doesn't always free its stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:08:31 +09:30
Rusty Russell
f3001e808c
source3/lib/smbconf/testsuite.c: fix stackframe leak
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:07:31 +09:30
Rusty Russell
15faffc537
source3/registry/reg_backend_db.c: fix stackframe leak
...
regdb_store_values_internal() doesn't always free its stackframe.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 05:06:31 +09:30