| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Try to help resolving reported compilation problem with
clang & musl C.
https://github.com/lvmteam/lvm2/issues/61
|
|
|
|
| |
Mask false-positive leak report.
|
|
|
|
| |
Better for Coverity to see no change for possibly opened handle.
|
|
|
|
|
| |
Avoid sleeping in pselect when thread missed reap() handling.
This speedup handling of daemon shutdown sequences.
|
|
|
|
|
| |
Reduce cov warning and remove this really ancient define
as lvm2 was never compilable on such platform.
|
| |
|
|
|
|
| |
Do not call pthread_join if thread_id would be 0.
|
|
|
|
|
| |
Report errors for open in better order.
Ensure descriptors are not leaked.
|
|
|
|
| |
Check for sigprocmask errors
|
|
|
|
|
| |
As we check for existince on entering path
let's ensure it's there also on exit path.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
To avoid tiny race on checking arrival of signal and entering select
(that can latter remain stuck as signal was already delivered) switch
to use pselect().
If it would needed, we can eventually add extra code for older systems
without pselect(), but there are probably no such ancient systems in
use.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.
Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.
|
|
|
|
|
| |
I wrote dbg_malloc before we had valgrind. These days there's just
no need.
|
|
|
|
|
|
|
| |
As we start refactoring the code to break dependencies (see doc/refactoring.txt),
I want us to use full paths in the includes (eg, #include "base/data-struct/list.h").
This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in
metadata/ from base/
|
| |
|
|
|
|
|
| |
Keep forked environment for daemon more strick and check even
for nearly impossible to happen errors.
|
|
|
|
|
|
|
|
|
|
| |
ATM we have several instances of daemonizing code.
Each has its 'special' logic so not completely easy
to unify them all into a single routine.
Start to unify them and use one strategy for rediricting
all input/outpus to /dev/null - use 'dup2' function for this
and open /dev/null before fork to make sure it's available.
|
|
|
|
| |
Also fix error message after pthread_create() error in handle_connect().
|
|
|
|
|
|
|
|
|
| |
Some archs can use even 64K pages and then lvm2 runs into trouble if
the stack is 'too small' to fit extra page capturing stack overwrite.
So when lvm2 limits stack - add extra mem page - be it 4K or 64K.
Relates to ppc64le bug: https://bugzilla.redhat.com/1387279
|
|
|
|
| |
to construct metadata trees
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Opened socket descriptor goes out-of-sight still opened.
Close it - but since this happens before app exit, it
just fixed valgrind report.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, a shutdown signal will cause lvmetad to quit
responding to new connections, but not actually exit until
all connections are gone. If a program is maintaining a
long running connection (e.g. lvmlockd, or even an lvm
command) when lvmetad gets a shutdown signal, then all
further commands will hang indefinately waiting for a
response that won't be sent.
With this patch, make lvmetad continue handling new
connections even after a shutdown signal. It will exit
once all connections are gone.
|
|
|
|
|
| |
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
|
| |
|
|
|
|
|
|
| |
The parsing code for log levels was missing
some levels. Also ignore an unrecognized
level name rather than failing.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
log data structures are ready. so why not pass
error messages through ERROR()
|
|
|
|
|
| |
when dm_creat_lockfile fails, it's probably due to
another instance is holding the same pid file...
|
|
|
|
|
|
| |
Invert S_ISSOCK validation.
Fail instead of replacing a symlink with a new socket.
After failure, skip calling fcntl with invalid socket_fd.
|
| |
|
|
|
|
|
|
|
|
| |
works with systemd activated daemons only as of now
each daemon implementation may decide to signalize its
internal idle state (i.e. all background tasks unrelated to
client threads are finished)
|
|
|
|
|
| |
internal daemon error log level was wrongly mapped to debug syslog
level causing most error messages were lost in non-debug mode.
|
|
|
|
|
|
|
| |
all sockets opened by a daemon or handed over by systemd
have to have CLOEXEC flag set. Otherwise we get nasty
warnings about leaking descriptors in processes spawned by
daemon.
|
| |
|
|
|
|
|
| |
Skip setting a value to a variable which is never
used and overwritten/set afterwards.
|
| |
|
|
|
|
| |
With older system headers (sys/wait.h) this shadows declaration.
|
| |
|
|
|
|
|
|
|
| |
Ensure daemon-io.h is used as a generic header included
with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header)
Rename couple defines to better match header file names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it easier to run a live lvmetad in debugging mode and
to avoid conflicts if multiple test instances need to be run
alongside a live one.
No longer require -s when -f is used: use built-in default.
Add -p to lvmetad to specify the pid file.
No longer disable pidfile if -f used to run in foreground.
If specified socket file appears to be genuine but stale, remove it
before use.
On error, only remove lvmetad socket file if created by the same
process. (Previous code removes socket even while a running instance
is using it!)
|