| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
|
| |
Simplifies the code, properly detects too long socket paths,
drops unused parameter.
|
| |
|
|
|
|
|
|
|
|
| |
In some occasional case dmevent restart was experiencing problems
with obtaining pid lockfile. So this patch tries to send several more kill
message until daemon kills itself so there is would reponse.
With this small loop the restart seems to work reliable,
although the loopsize and usleep are just randomly picked for now.
|
| |
|
|
|
|
|
|
|
|
| |
LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd
"start" action. But we still need to know whether we're activated during
"reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R"
for statefull daemon restart. We can't use normal "restart" as that is simply
composed of "stop" and "start" and we would lose any state the daemon has.
|
| |
|
|
|
|
|
|
| |
Properly test for dm_asprintf result.
Keep unlocking of mutex in the same function and do not spread lock and
unlock over functions.
|
|
|
|
|
| |
Operation on _thread_registry needs to be covered by mutex.
Cosmetic move a die code after free for valgind short leak list.
|
|
|
|
|
| |
In case of zero length message, there would be a memory leak on
return path from _do_process_request.
|
|
|
|
|
| |
Use %m for strerror.
Switch to use 0 for fail return code.
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
|
|
|
| |
Syslog error outside of mutex section.
|
|
|
|
|
| |
Some 'defines' used in this specific code were already under an ifdef so this
patch just completes it.
|
| |
|
| |
|
|
|
|
| |
Variables have (or will have) those values set.
|
|
|
|
|
|
| |
Update man page style.
Mention raid and thin plugins.
Update help text printed by command to match man page.
|
|
|
|
|
| |
For manipulation with thread list to avoid race with timeout thread,
take also _timeout_mutex.
|
| |
|
|
|
|
| |
Static analyzer noticed, strdup failing path leaks dmt structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Systemd preloads file descriptors for us and passes them in for
newly spawned daemon when using on-demand fifo (or socket)
based activation.
This patch adds checks for file descriptors preloaded by
systemd and uses them instead of opening the FIFOs again
to properly support on-demand FIFO-based activation.
(We'll change FIFOs to sockets soon - but still this
part of the code will stay almost the same.)
|
|
|
|
|
|
|
|
|
| |
The filename to adjust the oom score was changed in 2.6.36.
We should use oom_score_adj instead of oom_adj (which is still
there under /proc, but it's scheduled for removal in August 2012).
New oom_score_adj uses a range from -1000 (OOM_SCORE_ADJ_MIN,
disable oom killing) to 1000 (OOM_SCORE_ADJ_MAX).
|
|
|
|
|
|
| |
(protocol) version of the running dmeventd on the client side.
Right now this is only used in dmeventd -R.
|
|
|
|
|
| |
gcc suggested to add these attributes to instrumentat
printf arguments. Adding it for internal functions as well.
|
| |
|
|
|
|
| |
with an unknown command ID.
|
|
|
|
|
|
| |
- dmeventd -R will continue to start up even if no dmeventd is currently
running + a test for this behaviour
- add -R to dmeventd manpage
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Detect existence of new SELinux selabel interface during configure.
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
We should set the SELinux context before the actual file system object creation.
The new dm_prepare_selinux_context function sets this using the selabel_lookup
fn in conjuction with the setfscreatecon fn. If selinux/label.h interface
(that should be a part of the selinux library) is not found during configure,
we fallback to the original matchpathcon function instead.
|
|
|
|
| |
Replace multiple fprintf calls with multiline one.
|
|
|
|
| |
'ret' is never read anywhere - remove it.
|
| |
|
|
|
|
|
|
|
| |
We cast (char*) to (uint32_t*) that changes alignment requierements.
For our case the code has been correct as alloca() returns properly
aligned buffer, however this patch make it cleaner and more readable
and avoids warning generation.
|
|
|
|
| |
monitoring state.
|
| |
|
| |
|
|
|
|
|
|
| |
Switch dmeventd to use dm_create_lockfile and drop duplicate code.
Allow clvmd pidfile to be configurable.
Switch cmirrord and clvmd to use dm_create_lockfile.
|
| |
|
|
|
|
|
| |
Change -d to -f to run dmeventd in foreground.
(mornfall)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If dmeventd runs with -d flag, it doesn't fork into backgroud.
The command kill(getppid(), SIGTERM) attempts to kill the parent dmeventd
process, however, if there is no parent, it kills whatever process spawned
dmeventd. In case of debugging with gdb, the parent is gdb, thus
kill(getppid(), SIGTERM) kills the debugger.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
|
|
|
|
| |
As we need to use mlockall() enforce "C" locales for dmeventd.
|
|
|
|
|
|
| |
If the error path of _register_for_event() calls _free_thread_status()
_lib_put() call is missing.
To make thing simpler move this _lib_put() into common error path code.
|
|
|
|
|
|
|
|
|
| |
As the header file <sys/mman.h> was not included in dmeventd.c
thus missed definition of MCL_CURRENT so this patch only makes
it obvious we were not locking memory here.
This patch has no functional change.
Later part of this patch set handles mlockall() via memlock_inc_daemon().
|
| |
|