summaryrefslogtreecommitdiffstats
path: root/source3/smbd/aio.c
Commit message (Collapse)AuthorAgeFilesLines
* Add an optimization to pthread aio writes to also do fsync if requested.Jeremy Allison2012-07-121-0/+9
| | | | | Should help by ensuring complete writes done in sub-thread, not in the main thread.
* s3: Make us survive base-delaywrite with aio enabledVolker Lendecke2012-07-121-0/+4
| | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jul 12 21:28:19 CEST 2012 on sn-devel-104
* s3: Restore async i/o with the "native" AIO interfaceVolker Lendecke2012-06-261-3/+0
| | | | | | | | | | | | | eff3609 moved the async signal handler initialization to later in the process to enable aio_fork and aio_pthread on platforms without realtime signals. This commit broke the use of the native aio interface. aio_pending_size is initialized to 0, so aio.c will not allow async i/0 at all if modules do not set that variable correctly. Initialize to 100 right from the start. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jun 26 14:08:22 CEST 2012 on sn-devel-104
* s3:smbd: change aio.c to use fsp_fnum_dbg() for logging fsp->fnum.Michael Adam2012-06-151-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* build: Rationalise AIO support in configure, ensure on by defaultAndrew Bartlett2012-06-061-1/+1
| | | | | | | | | With this change, the define to check for AIO is HAVE_AIO, consistant with other subsystems. It is now also on by default in the autoconf build, as it has been for waf. Andrew Bartlett
* We never cancel SMB1 aio, only SMB2 aio - and in this case we always return ↵Jeremy Allison2012-04-121-12/+7
| | | | | | a value. So pass_cancel is no longer needed.
* Remove cancel_aio_by_fsp(). It can never work and could lead to memory ↵Jeremy Allison2012-04-121-30/+9
| | | | | | | corruption as outstanding IO's complete. Also we never have any aio's on a call to close_normal_file() with close_type ERROR_CLOSE.
* Move the counting of outstanding_aio_calls into the lifecycle of the ↵Jeremy Allison2012-04-121-6/+2
| | | | | | | | | aio_extra struct. This way we can't end up with a mismatch between outstanding events and the counter. We may still have problems with canceling and not correctly freeing the aio struct, but at least the counter won't get out of sync anymore.
* s3: Move the aio signal init to the vfs moduleVolker Lendecke2012-04-091-21/+7
| | | | | | On platforms that don't have an RT signal space, signal initialization fails. aio_fork and aio_pthread don't need the signal, so this would block them from running as well.
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-6/+6
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* Ensure we always free aio_ex on all error paths by moving the TALLOC_FREEJeremy Allison2012-01-121-2/+1
| | | | | | | call out of smbd_aio_complete_aio_ex() and into the caller. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jan 12 03:10:52 CET 2012 on sn-devel-104
* Remove unneeded NULL check.Jeremy Allison2011-11-151-4/+0
|
* s3:smbd/aio: handle_aio_completed() should do nothing if aio_ex->fsp is NULLStefan Metzmacher2011-11-151-0/+5
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Nov 15 18:47:55 CET 2011 on sn-devel-104
* s3:smbd/aio: pass ECANCELED to the smb2 aio handlersStefan Metzmacher2011-11-151-1/+4
| | | | metze
* s3:smbd/aio: add cancel_smb2_aio()Stefan Metzmacher2011-11-151-0/+38
| | | | metze
* s3: Fix smb2 handling error returns from aioVolker Lendecke2011-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found when reading with aio_fork beyond the end of file. Metze, Jeremy, please check! Without this we get [2011/08/02 21:02:54.082661, 0] lib/util.c:778(smb_panic_s3) PANIC (pid 2302): smbd/smb2_read.c:593: Type mismatch: name[NULL] expected[struct smbd_smb2_read_state] [2011/08/02 21:02:54.094316, 0] lib/util.c:882(log_stack_trace) BACKTRACE: 23 stack frames: #0 bin/smbd(log_stack_trace+0x2d) [0xb72873d8] #1 bin/smbd(smb_panic_s3+0x7c) [0xb7287529] #2 bin/smbd(smb_panic+0x2f) [0xb7277e1f] #3 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6bc48] #4 /root/git/s3-work/source3/bin/libtalloc.so.2 [0xb6c6ec79] #5 /root/git/s3-work/source3/bin/libtalloc.so.2(_talloc_get_type_abort+0x34) [0xb6c6ecb3] #6 bin/smbd [0xb6fbc405] #7 bin/smbd(_tevent_req_notify_callback+0x4a) [0xb729a85a] #8 bin/smbd [0xb729a888] #9 bin/smbd(_tevent_req_done+0x19) [0xb729aa73] #10 bin/smbd [0xb6fae517] #11 bin/smbd [0xb6fad258] #12 bin/smbd(smbd_aio_complete_aio_ex+0xf5) [0xb6fad6e8] #13 /root/git/inst/modules/vfs/aio_fork.so [0xb66d4992] #14 bin/smbd(run_events_poll+0x400) [0xb7297df2] #15 bin/smbd(smbd_process+0xd75) [0xb6f9d3a7] #16 bin/smbd [0xb756f07b] #17 bin/smbd(run_events_poll+0x400) [0xb7297df2] #18 bin/smbd [0xb7298254] #19 bin/smbd(_tevent_loop_once+0x9e) [0xb72986ac] #20 bin/smbd(main+0x185c) [0xb7570e59] #21 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb6b08455] #22 bin/smbd [0xb6f14e01] Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Tue Aug 2 22:33:15 CEST 2011 on sn-devel-104
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-2/+2
| | | | | | | | This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
* Fixup build without --with-aio.Jeremy Allison2011-05-051-1/+1
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu May 5 21:38:23 CEST 2011 on sn-devel-104
* Fix many const compiler warnings.Jeremy Allison2011-05-051-2/+2
|
* s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner2011-04-291-0/+1
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Change interface of schedule_smb2_aio_read() to allocate the return DATA_BLOB.Jeremy Allison2010-12-151-3/+11
| | | | | | | | | Change smb2_read code to allocate return DATA_BLOB just before the read. Preparing for SMB2 sendfile change which will not need to allocate return buffer. Jeremy
* s3: use monotonic clock for aio timeoutBjörn Jacke2010-09-071-2/+2
|
* s3: Make srv_send_smb take an sconn instead of a sock fdVolker Lendecke2010-08-241-3/+3
|
* s3: Remove smbd_server_fd from handle_aio_read/write_completeVolker Lendecke2010-08-161-2/+2
|
* s3: Remove smbd_server_fd from schedule_aio_write_and_XVolker Lendecke2010-08-161-1/+2
|
* s3: Fix some error messagesVolker Lendecke2010-08-131-3/+4
|
* Fix warning - no return value for a non-void fn.Jeremy Allison2010-07-201-0/+1
| | | | Jeremy.
* s3: Work better without the aio sighandlerVolker Lendecke2010-07-181-7/+22
| | | | Refuse async I/O if we can't set up the signal handler
* Fix the build in the non WITH_AIO case (sorry).Jeremy Allison2010-06-101-0/+20
|
* Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added).Jeremy Allison2010-06-101-0/+281
| | | | Jeremy.
* Make aio_ex owned by a talloc context, not neccessarily on the null context.Jeremy Allison2010-06-071-8/+12
|
* Move "write_though" into aio_ex struct.Jeremy Allison2010-06-071-5/+5
|
* wait_for_aio_completion() should return 0 on non-aio compiled case.Jeremy Allison2010-06-041-1/+1
|
* Rename req -> smbreq.Jeremy Allison2010-06-041-26/+26
|
* Change smbd_aio_complete_mid() -> smbd_aio_complete_aio_ex(). SimplifiesJeremy Allison2010-06-041-32/+4
| | | | | | the code and eliminates find_aio_ex(). Jeremy.
* Move to using a DATA_BLOB inside of struct aio_extra, not a char *.Jeremy Allison2010-06-021-16/+16
| | | | | | Will make using AIO in SMB2 easier. Jeremy.
* Don't use sigev_value.sival_int to just store the mid, use ↵Jeremy Allison2010-06-011-38/+26
| | | | | | | | | sigev_value.sival_ptr to store the private data structure. This allows easier use from SMB2. Ensure aio is initialized before the aio_pending_size check else aio will never be used. Jeremy.
* This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> ↵Jeremy Allison2010-05-071-2/+2
| | | | | | smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. Jeremy.
* Move to using 64-bit mid values in our internal open file database.Jeremy Allison2010-04-121-15/+23
| | | | | | | This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
* Fix issue with aio where r/w lock wasn't kept across aio read operations.Jeremy Allison2010-04-051-23/+56
| | | | | | | | Change schedule_aio_read_and_X/schedule_aio_write_and_X to return NTSTATUS. Move the grant and release of the lock into the aio code. Jeremy
* Move initialize_async_io_handler() inside of smbd/aio.c.Jeremy Allison2010-04-011-34/+42
| | | | | | Call from actual aio read or write. No reason to call this globally on startup. Jeremy.
* Remove use of "int ret" when we already have errcode.Jeremy Allison2009-10-131-13/+8
| | | | Jeremy.
* Catch one more erroneous use of errno.Jeremy Allison2009-10-131-1/+1
| | | | Jeremy.
* correctly handle aio_error() and errnoOlaf Flebbe2009-10-131-29/+24
|
* allow for outstanding_aio_calls to be decrementedOlaf Flebbe2009-09-301-2/+4
|
* Don't defer a talloc_move'd pointer.Jeremy Allison2009-09-281-1/+1
| | | | Jeremy.
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-201-14/+14
|
* Set SIGRTMIN to NSIGTimur I. Bakeyev2009-06-081-3/+0
| | | | | | | | | | | | | | In the includes we define SIGRTMIN to 32 if it's not defined already. This value could be fairly low and it's better to use NSIG(number of defined signals) as the lower mark for the available signals. We have similar defenition in the source3/smbd/aio.c, which can be safely removed, as it comes from includes.h then. With regards, Timur Bakeyev. Signed-off-by: Stefan Metzmacher <metze@samba.org>