summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_aio_fork.c
AgeCommit message (Collapse)AuthorFilesLines
2012-04-12Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED.Jeremy Allison1-0/+5
2012-04-09s3: Initialize aio_pending_size from aio_pthreadVolker Lendecke1-0/+19
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-1/+1
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
2012-03-31s3-aio-fork: Fix a segfault in vfs_aio_forkVolker Lendecke1-7/+9
aio_suspend does not signal the main process with a signal, it just waits. The aio_fork module does not use the signal at all, it directly calls back into the main smbd by calling smbd_aio_complete_aio_ex. This is an abstraction violation, but the alternative would have been to use signals where they are not needed. However, in wait_for_aio_completion this bites us: With aio_fork we call handle_aio_completed twice on the same aio_ex struct: Once from the call to handle_aio_completion within the aio_fork module and once from the code in wait_for_aio_completion. This patch fixes it in a pretty bad way by introducing flag variables and more state. But the mid-term plan is to replace the posix aio calls from the vfs and do pread_send/recv and pwrite_send/recv at the vfs layer, so this will significantly change anyway. Thanks to Kirill Malkin <kirill.malkin@starboardstorage.com> for reporting this crash! Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sat Mar 31 15:25:55 CEST 2012 on sn-devel-104
2012-03-31s3-aio-fork: Fix aio_suspend event hierarchyVolker Lendecke1-10/+8
We end up here multiple times. There's no real point putting the events into the child struct, at the end of this routine we need to free them anyway.
2012-03-31s3-aio-fork: Fix an alignment warning on OS/XVolker Lendecke1-2/+2
2012-03-24lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij1-1/+1
The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104
2012-01-12Ensure we always free aio_ex on all error paths by moving the TALLOC_FREEJeremy Allison1-0/+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
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe1-4/+4
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-2/+2
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-05-31s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett1-3/+3
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
2011-04-20s3-build: move MAP_FILE define to the only place used.Günther Deschner1-0/+4
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Apr 20 19:16:47 CEST 2011 on sn-devel-104
2011-03-30s3-vfs: try to fix build of aio_fork module.Günther Deschner1-1/+2
Guenther
2011-03-30s3-vfs: include smbd/smbd.h in vfs modules.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/shmem.h when needed.Günther Deschner1-0/+1
Guenther
2011-02-28s3: Survive an idle child that was killedChristian Ambach1-0/+6
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Feb 28 14:53:20 CET 2011 on sn-devel-104
2011-02-26s3: Improve a dbg msg in aio_forkVolker Lendecke1-4/+7
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Sat Feb 26 17:42:37 CET 2011 on sn-devel-104
2011-01-14s3:vfs aio_fork children do not go awayChristian Ambach1-1/+13
on RHEL 5.5, recvmsg() does not return when it is reading from the socket and the process on the other side closes its connection. This left aio children around that should have gone already and were just wasting system resources. This patch makes the child go away by writing invalid data to it so that the child exits. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Jan 14 09:57:18 CET 2011 on sn-devel-104
2011-01-14s3:vfs fix children cleanup in aio_forkChristian Ambach1-0/+1
the cleanup loop in aio_fork always stopped operation on the first inactive child it found. In case lots of children need to be reaped, it will take multiple runs before all children are gone
2010-09-28s3: Remove smbd_server_conn from files_forallVolker Lendecke1-3/+5
2010-07-18s3: Actually use the usecs in aio_fork_suspendVolker Lendecke1-1/+2
Jeremy, please check!
2010-07-18s3: Fix an uninitialized variableVolker Lendecke1-1/+1
2010-06-04Fix a long-standing bug with async io that would only be triggered by SMB2.Jeremy Allison1-0/+124
On normal or shutdown close, ensure we wait for any pending IO to complete before returning. Implement a blocking aio_suspend inside vfs_aio_fork.c. These changes pass make test when the aio_fork module is used by default on the test shares. Jeremy.
2010-06-04Oops. Forgot to re-initialize the aio_ex pointer from sival_ptr.Jeremy Allison1-0/+1
2010-06-04Change smbd_aio_complete_mid() -> smbd_aio_complete_aio_ex(). SimplifiesJeremy Allison1-7/+2
the code and eliminates find_aio_ex(). Jeremy.
2010-04-12Move to using 64-bit mid values in our internal open file database.Jeremy Allison1-2/+3
This will allow us to share logic much easier between SMB1 and SMB2 servers. Jeremy
2010-03-22s3: file_walk_table -> files_forallVolker Lendecke1-1/+1
This is more in line with the rest of the Samba code, like connections_forall etc.
2009-09-14s3: Test short reads in the build farmVolker Lendecke1-0/+3
2009-07-24Make the smbd VFS typesafeVolker Lendecke1-16/+7
2009-05-18In aio_fork, we have to close all fd's, we might hold a gpfs share modeVolker Lendecke1-0/+16
Keeping such an fd open prohibits another open of that same file.
2009-05-18Fix a race condition in vfs_aio_fork with gpfs share modesVolker Lendecke1-2/+8
2009-05-12Clean up assignments to iov_base, ensure it's always cast to void *. This ↵Jeremy Allison1-2/+2
should quieten some warnings with picky compilers on the buildfarm. Jeremy.
2009-01-27s3:smbd: convert aio to use tevent_signalStefan Metzmacher1-2/+1
metze
2009-01-05s3:events: change event_add_timed() prototype to match samba4Stefan Metzmacher1-4/+2
metze
2008-04-11Remove a redundant TALLOC_FREEVolker Lendecke1-1/+0
(This used to be commit 8e348ab8652e1893be78384404f57df1dbbcea48)
2008-03-16Need to close the /dev/zero fdVolker Lendecke1-0/+2
(This used to be commit c2b2a9303d9c84ba4e059f13de9ccc401d08bd59)
2008-02-29Add vfs_aio_forkVolker Lendecke1-0/+728
This is used for two purposes: First, I'm using it to test the async I/O code. In the forked process it is pretty easy to delay a reply for a random amount of time. See the BUILD_FARM_HACKS snippet. Second, there are systems around that claim to have Posix AIO but which is broken. This might be some help for those systems. Also add tests how to pass file descriptors (This used to be commit b0e52cecf2009d4c7f29412dadf17910e54e4327)