Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
The writev system call can return -1 and errno ENOMEM, as a
retriable condition.
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 13 23:50:05 CET 2013 on sn-devel-104
|
|
set dir seems to have been a special SMB command used by Pathworks clients
the supporting code for it was already removed in 2007, so just remove all
remnants related to it (smb.conf parameter, documentation, ...)
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 12 01:03:37 CET 2013 on sn-devel-104
|
|
If we compile with -fstack-protector, we should link
with it.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 6 04:06:04 CET 2013 on sn-devel-104
|
|
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
|
|
Reviewed-by: David Disseldorp <ddiss@samba.org>
|
|
Reviewed-by: David Disseldorp <ddiss@samba.org>
|
|
Reviewed-by: David Disseldorp <ddiss@samba.org>
|
|
The "else" keywords are not necessary here, we return in the preceding
if clause
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Mar 5 14:00:47 CET 2013 on sn-devel-104
|
|
This matches what was done for lib/socket/socket_unix.c in
c692bb02b039ae8fef6ba968fd13b36ad7d62a72.
(and is based on that patch by Landon Fuller <landonf@bikemonkey.org>)
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 4 11:15:35 CET 2013 on sn-devel-104
|
|
This release contains a lot of fixes:
- Adding new timer events is now faster, if there's
a large number of timer events.
- sigprocmask does not work on FreeBSD to stop further signals in a signal
handler.
- TEVENT_NUM_SIGNALS is calculated by configure in order
to support realtime signals on freebsd.
- ./configure --disable-python was fixed for the standalone build.
- Several crash bugs in the poll backend are fixed.
- The poll backend removes deleted events from the
cached pollfd array now.
- The poll doesn't pass pollfd.events == 0 to poll()
and maintains a list of disabled events,
instead of consuming 100% cpu and/or triggering
the callers handler.
- The poll backend detects POLLNVAL and reports EBADF
instead of consuming 100% cpu.
- The select backend supports separate handlers
for TEVENT_FD_READ and TEVENT_FD_WRITE.
- The poll and select backends are now doing fair
queuing of fd events.
- The epoll has better error checking
and supports separate handlers
for TEVENT_FD_READ and TEVENT_FD_WRITE.
- The standard backend was rewritten to be a tiny
wrapper on top of epoll with a fallback to poll,
which means that it doesn't use select directly anymore.
- TEVENT_TRACE_BEFORE_LOOP_ONCE and TEVENT_TRACE_AFTER_LOOP_ONCE
are added in order to allow the application to hook in
before and after the loop_once() backend function is called.
The TEVENT_HAS_LOOP_ONCE_TRACE_POINTS define can be used to
detect the new feature.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar 2 02:15:44 CET 2013 on sn-devel-104
|
|
Such events were used before we had immediate events.
It's likely that there're a lot of this events
and we need to add new ones in fifo order.
The tricky part is that tevent_common_add_timer()
should not use the optimization as it's used
by broken Samba versions, which don't use
tevent_common_loop_timer_delay() in source3/lib/events.c.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
As new timestamps typically get higher:-)
it's better to traverse the existing list from
the tail.
This is not completely optimal, but it should be better
than before.
A second optimization could be done for zero timestamps,
we would just remember the last_zero_timer,
but that would change the internal ABI.
Normally thatshould not be a poblem, but the Samba's
source3/lib/events.c abuses tevent_internal.h
from the current source tree, even if an external tevent.h
is used. The other problem is that it makes use of
tevent_common_add_timer() without using
tevent_common_loop_timer_delay().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
We should debug a message before and after running the handler.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This test fills the socket kernel buffers
and verifies that we don't report TEVENT_FD_WRITE
if the buffer is full.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This test verifies that TEVENT_FD_* flags are handled correctly.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
separate read/write events on a single fd.
This tests the multiplex fd changes to the epoll backend to
ensure they work correctly.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
A Samba autobuild passed without a fallback, so this is
really an error.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
fde's into one epoll event.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
registered with epoll
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
multiplexed fde event.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
We'll use this to handle the EPOLL_ADDITIONAL_FD_FLAG_GOT_ERROR
and EPOLL_ADDITIONAL_FD_FLAG_REPORT_ERROR flags with multiplexed
events in the event loop.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
correctly.
Add a utility function epoll_add_multiplex_fd() and
a new flag EPOLL_ADDITIONAL_FD_FLAG_HAS_MPX.
This will be called by epoll_add_event() to merge two
fde events with the same file descriptor.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
epoll_{add,mod,del}_event()
epoll_{add,mod,del}_event() are only called via epoll_update_event()
and epoll_update_event() should not remove REPORT_ERROR itself.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Only ENOENT is ignored as it is no error.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
We'll never leave epoll_check_reopen() with epoll_fd == -1.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
We also need to fallback in tevent_loop_wait()
otherwise we might miss events in the poll->fresh list.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
The epoll backend has done the cleanup already.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This calls TALLOC_FREE(ev->additional_data), which is epoll_ev
within epoll_panic() before calling the fallback handler.
In order to notice that a epoll_panic() happened, a caller can
register a pointer to a bool variable under epoll_ev->panic_state.
As epoll_check_reopen() can fail due to a epoll_panic(),
we need to force the replay flag if we have called any event handler.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This makes sure we only do random panics if a fallback handler
is registered.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
poll()
This makes sure we don't preferr events which are at the beginning
of the list.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
When we're deciding what handlers to call in the select backend,
we didn't take into account the fact that the same fd may have
been added into the read FD_SET and the write FD_SET but with
different handlers.
We must match on both the file descriptor and the flags requested
before calling the handler.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
This is important to avoid races between threads if the poll_mt
backend is used.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
That has the same complexity but simplifies the code.
It also seems to fix a real problem, which was found
by the following test failure in Samba's autobuild,
while removing the epoll support from the "standard" backend.
[402/1555 in 19m8s] samba3.raw.composite(plugin_s4_dc)
smbtorture 4.1.0pre1-DEVELOPERBUILD
Using seed 1361531675
Testing savefile
Testing parallel fetchfile with 10 ops
waiting for completion
maximum runtime exceeded for smbtorture - terminating
UNEXPECTED(error): samba3.raw.composite.fetchfile (subunit.RemotedTestCase)(plugin_s4_dc)
REASON: _StringException: _StringException: was started but never finished!
UNEXPECTED(error): samba3.raw.composite.fetchfile(plugin_s4_dc) (subunit.RemotedTestCase)
REASON: was started but never finished!
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
We need to avoid passing pollfd.events == 0, to poll(),
as it will report POLLERR and POLLHUP events, but our caller
does not expect the event handler to be called.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|