summaryrefslogtreecommitdiff
path: root/libdaemon
Commit message (Collapse)AuthorAgeFilesLines
* cov: remove unused headersZdenek Kabelac2022-07-111-1/+0
|
* clang: possible better compilation with musl cZdenek Kabelac2022-02-161-0/+1
| | | | | | Try to help resolving reported compilation problem with clang & musl C. https://github.com/lvmteam/lvm2/issues/61
* cov: mask some warning about leakageZdenek Kabelac2021-09-201-0/+2
| | | | Mask false-positive leak report.
* cov: use different variable nameZdenek Kabelac2021-09-201-6/+6
| | | | Better for Coverity to see no change for possibly opened handle.
* daemon-server: handle reaping threads betterZdenek Kabelac2021-04-061-10/+13
| | | | | Avoid sleeping in pselect when thread missed reap() handling. This speedup handling of daemon shutdown sequences.
* cov: drop checking for EWOULDBLOCKZdenek Kabelac2020-09-122-4/+1
| | | | | Reduce cov warning and remove this really ancient define as lvm2 was never compilable on such platform.
* cov: more checks for failing syscallsZdenek Kabelac2019-11-141-1/+2
|
* daemons: check for non-zero thread_idZdenek Kabelac2019-11-111-1/+2
| | | | Do not call pthread_join if thread_id would be 0.
* daemon: better error path handling for shutdownZdenek Kabelac2019-11-111-7/+16
| | | | | Report errors for open in better order. Ensure descriptors are not leaked.
* cov: missing checks of syscallsZdenek Kabelac2019-11-111-3/+6
| | | | Check for sigprocmask errors
* cov: check for socket_path being setZdenek Kabelac2019-08-091-1/+1
| | | | | As we check for existince on entering path let's ensure it's there also on exit path.
* cleanup: missed string specifierZdenek Kabelac2019-04-171-1/+1
|
* libdaemon: use pselect to avoid condition checking raceZdenek Kabelac2019-04-162-11/+29
| | | | | | | | | | 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.
* build: Remove reference to undefined @BUILD_LVMETAD@Marian Csontos2018-12-181-4/+1
|
* makefiles: drop unneeded LIBS addZdenek Kabelac2018-12-171-2/+0
|
* headers: use configure.h as 1st. headerZdenek Kabelac2018-12-145-15/+5
| | | | | | | | | | | 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.
* device_mapper: remove dbg_malloc.Joe Thornber2018-06-084-16/+16
| | | | | I wrote dbg_malloc before we had valgrind. These days there's just no need.
* device-mapper: Fork libdm internally.Joe Thornber2018-05-162-2/+2
| | | | | | | | | | | | 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.
* build: Don't generate symlinks in include/ dirJoe Thornber2018-05-148-15/+15
| | | | | | | 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/
* tidy: Add missing underscores to statics.Alasdair G Kergon2017-10-183-8/+8
|
* deamonize: restore detection of errorsZdenek Kabelac2017-09-061-6/+13
| | | | | Keep forked environment for daemon more strick and check even for nearly impossible to happen errors.
* daemonize: more unified codeZdenek Kabelac2017-08-251-6/+15
| | | | | | | | | | 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.
* lvmetad: Suppress accept error on clean shutdownAlasdair G Kergon2017-07-061-3/+4
| | | | Also fix error message after pthread_create() error in handle_connect().
* lvmetad: fix segfault on i386Christian Brauner2017-03-131-1/+1
| | | | | | | | | 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>
* mem: add extra mem pages for pthread stackZdenek Kabelac2017-02-111-1/+1
| | | | | | | | | 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
* config: use config_tree_from_string_without_dup_node_check throughout code ↵Peter Rajnoha2016-09-212-2/+2
| | | | to construct metadata trees
* config: add config_tree_from_string_without_dup_node_check to replace ↵Peter Rajnoha2016-09-212-0/+17
| | | | dm_config_from_string where needed
* libdaemon: add errno to error messageDavid Teigland2016-08-191-2/+2
|
* pre-releasev2_02_161Alasdair G Kergon2016-07-151-1/+1
|
* cleanup: local static functions with _Zdenek Kabelac2016-07-151-9/+9
|
* coverity: close socket before closing appZdenek Kabelac2016-07-151-0/+4
| | | | | | Opened socket descriptor goes out-of-sight still opened. Close it - but since this happens before app exit, it just fixed valgrind report.
* coverity: cleaning some PW.NOT_COMPATIBLE_WITH_PREVIOUS_DECLZdenek Kabelac2016-07-132-2/+2
| | | | Some very low-prio warns....
* lvmetad: process new connections after shutdown signalDavid Teigland2016-06-201-5/+11
| | | | | | | | | | | | | | 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.
* cleanup: add backtraceZdenek Kabelac2016-03-101-10/+8
|
* coverity: helping coverity with NULL pointerZdenek Kabelac2016-02-261-2/+2
| | | | | | 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.
* gcc: logical-op warning go awayZdenek Kabelac2016-02-231-4/+6
| | | | | Don't be too much inventive and shutdown gcc6 warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
* doc: change fsf addressZdenek Kabelac2016-01-2113-13/+13
| | | | | Hmm rpmlint suggest fsf is using a different address these days, so lets keep it up-to-date
* libdaemon: prohibit use of %d for 64bit numbresZdenek Kabelac2015-11-091-1/+6
| | | | | Do not let pass %d and print internal error when found one. Require all users to use FMTd64 - it's seriously confusing.
* libdaemon: fix typo in last log enable commitDavid Teigland2015-10-211-1/+1
|
* libdaemon: allow all debug levels for stderrDavid Teigland2015-10-211-2/+8
| | | | | | The parsing code for log levels was missing some levels. Also ignore an unrecognized level name rather than failing.
* lockd: add debug logging for metadata errorDavid Teigland2015-09-292-1/+2
| | | | | | | | | 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.
* cleanup: move var declarationZdenek Kabelac2015-08-181-1/+1
|
* libdaemon: config_make_nodes_v needs fixingPeter Rajnoha2015-07-091-0/+4
| | | | | | 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...
* include: Standardise around new tool.h.Alasdair G Kergon2015-07-068-27/+33
|
* macros: Wrap PRI with FMT.Alasdair G Kergon2015-07-061-2/+3
| | | | | Create a set of wrappers with embedded % such as #define FMTu64 "%" PRIu64
* Add lvmlockddev-dct-lvmlockd-AZDavid Teigland2015-07-022-5/+16
|
* makefiles: avoid bash == operator syntax, use = insteadFerenc Wágner2015-06-261-2/+5
| | | | | | | | | 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.
* libdaemon: add comment about using main and initDavid Teigland2015-06-241-0/+5
|
* libdaemon: allow main processing function to be specifiedDavid Teigland2015-06-232-1/+8
|
* libdaemon: move compare_config to libDavid Teigland2015-06-172-0/+59
| | | | so it can be used elsewhere.