| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The device-mapper directory now holds a copy of libdm source. At
the moment this code is identical to libdm. Over time code will
migrate out to appropriate places (see doc/refactoring.txt).
The libdm directory still exists, and contains the source for the
libdevmapper shared library, which we will continue to ship (though
not neccessarily update).
All code using libdm should now use the version in device-mapper.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
| |
Sending %d as format argument in lvmetad_vg_remove_pending() will cause
segfaults in config_make_nodes_v() when va_arg() casts to int64_t. Also, it is
clearly advertised in the lvm source code that using plain %d is prohibited, so
let's switch to FMTd64.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
dm_config_from_string where needed
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Opened socket descriptor goes out-of-sight still opened.
Close it - but since this happens before app exit, it
just fixed valgrind report.
|
|
|
|
| |
Some very low-prio warns....
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Helping with understanding we will not try to deref NULL pointer,
as if the sizes are initialized to NULL it also means 'mem' would
be NULL, but thats too hard to model so make it obvious.
|
|
|
|
|
| |
Don't be too much inventive and shutdown gcc6 warning:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
|
|
|
|
|
| |
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
|
|
|
|
|
| |
Do not let pass %d and print internal error when found one.
Require all users to use FMTd64 - it's seriously confusing.
|
| |
|
|
|
|
|
|
| |
The parsing code for log levels was missing
some levels. Also ignore an unrecognized
level name rather than failing.
|
|
|
|
|
|
|
|
|
| |
When lvmetad_pvscan_vg() reads VG metadata from each PV,
it compares it to the last one to verify it matches.
If the VG metadata does not match on the PVs, an error
is printed and it fails to read the VG. In this error
case, use log_debug to show the differences between
the two unmatching copies of the metadata.
|
| |
|
|
|
|
|
|
| |
Put the change from commit #10d27998b3d2f6100e9e29e83d1d99948c55875f
back so we have working tree again for now. This code needs a bit of
a cleanup to return proper return value to check...
|
| |
|
|
|
|
|
| |
Create a set of wrappers with embedded % such as
#define FMTu64 "%" PRIu64
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit e587b0677b705786a78f21bac1966621f70b2752 broke the build on
systems where /bin/sh is Dash, for example.
Origin patch by Ferenc Wágner <wferi@niif.hu> changed later to
avoid using shell call, so makefile add 'server' target when
one of metad or polld daemon is requested.
|
| |
|
| |
|
|
|
|
| |
so it can be used elsewhere.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
See doc/lvmpolld_overview.txt
|
|
|
|
|
|
|
|
| |
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.
|