summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mirror: Add deprecation warning for mirrored logdev-mcsontos-mirrored-logMarian Csontos2018-02-142-0/+9
|
* test: mirrored mirrorlog is not supposed to work in clusterMarian Csontos2018-02-142-4/+18
|
* make: Fix typoMarian Csontos2018-02-131-1/+1
| | | | - M_INSTALL_SCRIPT is unused, should be M_INSTALL_PROGRAM
* config: Clarify filter documentationMarian Csontos2018-02-132-4/+4
|
* python: add devmapper library to linkingZdenek Kabelac2018-02-091-2/+2
| | | | | | | | | On occasional gcc releases it's better to specify also -ldevmapper to linking logic for python object. It's in fact more correct since the liblvm.c code is using libdevmapper functions - that were linked in only via liblvm2app library.
* partial revert "command: Skip some memory zeroing."Zdenek Kabelac2018-02-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit da37cbd24fc0073f3f00a3b7aac7807d2185b829. As the _cmdline structure use mempool for allocated ellement that is being release on cmd_context close. Before the better fix is made - restore previous logic and reinitialize cmd structures again for new cmd_context. Problem can be hit with e.g. this test run: make check_local T=foreign LVM_VALGRIND_DMEVENTD=1 Invalid read of size 1 at 0x4C31C83: strcmp (vg_replace_strmem.c:846) by 0x6BA0939: _find_command (lvmcmdline.c:1555) by 0x6BA4304: lvm_run_command (lvmcmdline.c:2810) by 0x6BD5E02: lvm2_run (lvmcmdlib.c:91) by 0x685607E: dmeventd_lvm2_run (dmeventd_lvm.c:118) by 0x6652684: _use_policy (dmeventd_thin.c:117) by 0x6652E56: process_event (dmeventd_thin.c:298) by 0x10CC5A: _do_process_event (dmeventd.c:945) by 0x10CF83: _monitor_thread (dmeventd.c:1033) by 0x54B35E0: start_thread (in /usr/lib64/libpthread-2.26.9000.so) by 0x57C30EE: clone (in /usr/lib64/libc-2.26.9000.so) Address 0x6266270 is 4,352 bytes inside a block of size 8,192 free'd at 0x4C2ED68: free (vg_replace_malloc.c:530) by 0x5289142: dm_free_wrapper (dbg_malloc.c:393) by 0x528998A: _free_chunk (pool-fast.c:318) by 0x52892A6: dm_pool_destroy (pool-fast.c:78) by 0x6A8E52C: destroy_toolcontext (toolcontext.c:2254) by 0x6BA5BD6: lvm_fin (lvmcmdline.c:3327) by 0x6BD5EA7: lvm2_exit (lvmcmdlib.c:123) by 0x6856013: dmeventd_lvm2_exit (dmeventd_lvm.c:103) by 0x66535B8: unregister_device (dmeventd_thin.c:432) by 0x10CBBC: _do_unregister_device (dmeventd.c:926) by 0x10CD74: _monitor_unregister (dmeventd.c:979) by 0x10D094: _monitor_thread (dmeventd.c:1066) by 0x54B35E0: start_thread (in /usr/lib64/libpthread-2.26.9000.so) by 0x57C30EE: clone (in /usr/lib64/libc-2.26.9000.so) Block was alloc'd at at 0x4C2DBBB: malloc (vg_replace_malloc.c:299) by 0x5288F46: dm_malloc_aux (dbg_malloc.c:287) by 0x52890AC: dm_malloc_wrapper (dbg_malloc.c:371) by 0x52898E6: _new_chunk (pool-fast.c:286) by 0x52893BA: dm_pool_alloc_aligned (pool-fast.c:106) by 0x5289310: dm_pool_alloc (pool-fast.c:90) by 0x6A8A21A: _load_config_file (toolcontext.c:808) by 0x6A8A3D9: _init_lvm_conf (toolcontext.c:842) by 0x6A8D3BD: create_toolcontext (toolcontext.c:1941) by 0x6BA5B24: init_lvm (lvmcmdline.c:3308) by 0x6BD5B7C: cmdlib_lvm2_init (lvmcmdlib.c:34) by 0x6BD5EB8: lvm2_init (lvm2cmd.c:20) by 0x6855EA7: dmeventd_lvm2_init (dmeventd_lvm.c:67) by 0x665305F: register_device (dmeventd_thin.c:352) by 0x10CB7A: _do_register_device (dmeventd.c:916) by 0x10CEE4: _monitor_thread (dmeventd.c:1006) by 0x54B35E0: start_thread (in /usr/lib64/libpthread-2.26.9000.so) by 0x57C30EE: clone (in /usr/lib64/libc-2.26.9000.so)
* toolcontext: do not change stream for pthreaded programsZdenek Kabelac2018-02-092-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With pthreaded daemons like 'dmeventd' using liblvm via plugin, lvm2 actually should not 'play' with streams at all - as there could be parallel outputs running. As a current quick workaround just disable change for pthreaded program (gettid() != getpid()). TODO: it's possible the change of buffering actually doesn't serve us any measurable benefit and could be dropped as whole later... Meanwhile this patch is fixing this occasional valgrind race report: Invalid read of size 4 at 0x571892C: vfprintf (in /usr/lib64/libc-2.26.9000.so) by 0x57216B3: fprintf (in /usr/lib64/libc-2.26.9000.so) by 0x5042886: dm_event_log (libdevmapper-event.c:925) by 0x10B015: _dmeventd_log (dmeventd.c:125) by 0x10D289: _unregister_for_event (dmeventd.c:1146) by 0x10E52E: _handle_request (dmeventd.c:1583) by 0x10E6D7: _do_process_request (dmeventd.c:1631) by 0x10E7C6: _process_request (dmeventd.c:1660) by 0x1101A4: main (dmeventd.c:2285) Address 0x6264d30 is 192 bytes inside a block of size 552 free'd at 0x4C2ED68: free (vg_replace_malloc.c:530) by 0x573907D: fclose@@GLIBC_2.2.5 (in /usr/lib64/libc-2.26.9000.so) by 0x6AC5C00: reopen_standard_stream (log.c:189) by 0x6A8E62C: destroy_toolcontext (toolcontext.c:2271) by 0x6BA5C22: lvm_fin (lvmcmdline.c:3339) by 0x6BD5EF3: lvm2_exit (lvmcmdlib.c:123) by 0x6856013: dmeventd_lvm2_exit (dmeventd_lvm.c:103) by 0x66535B8: unregister_device (dmeventd_thin.c:432) by 0x10CBBC: _do_unregister_device (dmeventd.c:926) by 0x10CD74: _monitor_unregister (dmeventd.c:979) by 0x10D094: _monitor_thread (dmeventd.c:1066) by 0x54B35E0: start_thread (in /usr/lib64/libpthread-2.26.9000.so) by 0x57C30EE: clone (in /usr/lib64/libc-2.26.9000.so) Block was alloc'd at at 0x4C2DBBB: malloc (vg_replace_malloc.c:299) by 0x573932B: fdopen@@GLIBC_2.2.5 (in /usr/lib64/libc-2.26.9000.so) by 0x6AC5DC2: reopen_standard_stream (log.c:200) by 0x6A8D11D: create_toolcontext (toolcontext.c:1898) by 0x6BA5B6B: init_lvm (lvmcmdline.c:3319) by 0x6BD5BC8: cmdlib_lvm2_init (lvmcmdlib.c:34) by 0x6BD5F04: lvm2_init (lvm2cmd.c:20) by 0x6855EA7: dmeventd_lvm2_init (dmeventd_lvm.c:67) by 0x665305F: register_device (dmeventd_thin.c:352) by 0x10CB7A: _do_register_device (dmeventd.c:916) by 0x10CEE4: _monitor_thread (dmeventd.c:1006) by 0x54B35E0: start_thread (in /usr/lib64/libpthread-2.26.9000.so) by 0x57C30EE: clone (in /usr/lib64/libc-2.26.9000.so) .... Process terminating with default action of signal 6 (SIGABRT): dumping core at 0x570016B: raise (in /usr/lib64/libc-2.26.9000.so) by 0x5701520: abort (in /usr/lib64/libc-2.26.9000.so) by 0x57437D8: __libc_message (in /usr/lib64/libc-2.26.9000.so) by 0x5743831: __libc_fatal (in /usr/lib64/libc-2.26.9000.so) by 0x5744056: _IO_vtable_check (in /usr/lib64/libc-2.26.9000.so) by 0x574751C: __overflow (in /usr/lib64/libc-2.26.9000.so) by 0x574191A: fputc (in /usr/lib64/libc-2.26.9000.so) by 0x50428E3: dm_event_log (libdevmapper-event.c:934) by 0x10B015: _dmeventd_log (dmeventd.c:125) by 0x10D289: _unregister_for_event (dmeventd.c:1146) by 0x10E52E: _handle_request (dmeventd.c:1583) by 0x10E6D7: _do_process_request (dmeventd.c:1631) by 0x10E7C6: _process_request (dmeventd.c:1660) by 0x1101A4: main (dmeventd.c:2285)
* format_text: Use versionsort to sort archive filesAlasdair G Kergon2018-02-092-2/+3
| | | | | | | Ensure that vg_100000-* follows vg_99999-* so that the expiry logic doesn't stop too early. https://bugzilla.redhat.com/1481085
* device: Fix basic async I/O error handlingdev-agk-tmpAlasdair G Kergon2018-02-088-41/+67
|
* device: Queue any aio beyond defined limits.Alasdair G Kergon2018-02-086-3/+104
|
* lvmcache: Use asynchronous I/O when scanning devices.Alasdair G Kergon2018-02-084-17/+164
|
* device: Basic config and setup to support async I/O.Alasdair G Kergon2018-02-0815-1/+419
|
* device: Add flag to indicate that a code path can support AIOAlasdair G Kergon2018-02-063-1/+7
| | | | | | Until the whole source supports AIO, library code can check for AIO_SUPPORTED_CODE_PATH to determine whether or not it is OK to use AIO.
* callbacks: Miscellaneous fixes for recent changesAlasdair G Kergon2018-02-066-7/+10
|
* configure: ensure path /usr/sbin is checked for some toolsZdenek Kabelac2018-02-013-27/+30
| | | | | | | Some tools are typically installed into /usr/sbin (or /sbin) dir. And some systems do not add this path to user's $PATH var. Ensure sbin paths are looked through...
* libdm: accept mirror status with userspace word in the lineZdenek Kabelac2018-02-012-0/+6
| | | | | Just making sure the parser will not stop - although greater level of support needs to be added (Describing doc seems to be missing however).
* pvmove: reinstantiate clustered pvmoveZdenek Kabelac2018-02-015-32/+93
| | | | | | | | In fact pvmove does support 'clustered-core' target for clustered pvmove of LVs activated on multiple nodes. This patch restores support for activation of pvmove on all nodes for LVs that are also activate on all nodes.
* lvmdbusd: Remove duplicated DataPercent definitionTim Foerster2018-01-251-1/+0
|
* doc: Add VDO stacking documentMarian Csontos2018-01-251-0/+85
|
* dev_io: fix writes for unaligned buffersZdenek Kabelac2018-01-231-3/+14
| | | | | | | Actually the removed code is necessary - since not all writes are getting alligned buffer - older compilers seems to be not able to create 4K aligned buffers on stack - this the aligning code still need to be present for write path.
* tests: update set of devicesZdenek Kabelac2018-01-231-2/+2
| | | | | Previous change added slighly more complex mapping so missed to update few pieces.
* debug: drop DEBUG_MEM pathZdenek Kabelac2018-01-231-17/+1
| | | | Memory is not allocated so no DEBUG_MEM part is needed.
* python: some LVs do need exclusive activationZdenek Kabelac2018-01-231-1/+3
|
* device: Add ioflags parameter to transfer additional state.Alasdair G Kergon2018-01-2119-101/+107
| | | | | Flags are set on the initial I/O and passed to any callbacks that may in turn issue further I/O using the inherited flags.
* activation: move check laterZdenek Kabelac2018-01-171-6/+6
| | | | Check for lv when it's known in all cases.
* tests: check pvmove is merging segmentsZdenek Kabelac2018-01-171-5/+15
| | | | | pvmove was imporoved to properly merge consqutive segments after pvmove so check it's working.
* tests: longer startup timeout for daemons with valgrindZdenek Kabelac2018-01-171-8/+8
| | | | It's getting noticable somewhat slower...
* tests: check preserved exclusivness of snapshot mergeZdenek Kabelac2018-01-172-0/+13
| | | | Detect if origin remains exclusively activated after merging.
* tests: properly test with clustered VGZdenek Kabelac2018-01-173-19/+19
| | | | Testing in cluster makes sense only with clustered VG.
* cleanup: drop unused codeZdenek Kabelac2018-01-171-9/+0
|
* cleanup: enhance messagesZdenek Kabelac2018-01-172-14/+16
| | | | | Add extra info about failing local exlusive activation (as in cluster the LV can be active on some other nodes).
* activation: guard exclusive activationZdenek Kabelac2018-01-172-0/+11
| | | | | | | | | Add protectional internall error whenever we spot activation of 'exclusive' only segments in 'non-exclusive' mode. TODO: possibly the activation locking could be enhanced to handle this fully behind the scene - as for now this works purely for lvchange/vgchange activation.
* dmeventd: add check for result codeZdenek Kabelac2018-01-171-1/+5
| | | | Check result from pthread_kill.
* pvmove: drop misleading pvmove restriction for clusterZdenek Kabelac2018-01-171-10/+0
| | | | | | pvmove handles properly locked LVs in cluster and this extra check actually cause misbehavior as some LVs were silently skipped from operation scope.
* pvmove: better check for exclusive LVZdenek Kabelac2018-01-171-1/+3
|
* pvmove: fix _remove_sibling_pvs_from_trim_listZdenek Kabelac2018-01-172-3/+14
| | | | | | Fix the function to really check it sibling raid image LV. For LV_rmeta_0 check for LV_rimage_0 instead of LV_rmeta_0rimage_0.
* lvconvert: use excl activation for conversionZdenek Kabelac2018-01-174-12/+13
| | | | | | | | | | | | | Use properly exclusive activation when reactivating origin after snapshot merge (since origin must have been previously also exlusively activated). Same applies when converting volumes to thin-pool or cache. Previously used 'only' local activation incorrectly allowed local activation of some targets (i.e. raid) - thus 'leaking' chance to activate same device on another node - which can be a problem for device types like raid.
* device: Move buffer allocation nearer to the I/O.Alasdair G Kergon2018-01-161-7/+12
| | | | | | Don't allocate memory until it's needed - later we'll add some of the I/O to an internal queue instead of issuing it immediately.
* device: Merge _dev_read and dev_read_callback.Alasdair G Kergon2018-01-162-36/+25
|
* format_text: Refactor mda counting in label processing.Alasdair G Kergon2018-01-151-19/+34
|
* format_text: Change update_mda_baton to use label not labellerAlasdair G Kergon2018-01-151-5/+5
|
* device: Rearrange _aligned_io().Alasdair G Kergon2018-01-151-38/+35
|
* device: Add reason to devbuf.Alasdair G Kergon2018-01-152-4/+6
|
* device: Store offset to data instead of pointer.Alasdair G Kergon2018-01-152-7/+8
| | | | | We want to save the relative offset before we've allocated the buffer's memory.
* device: Reorder device.h before change.Alasdair G Kergon2018-01-151-29/+27
|
* command: Skip some memory zeroing.Alasdair G Kergon2018-01-132-17/+6
| | | | | commands[] is in bss, its content wouldn't change if reinitialised and unregister has no memory to free so don't bother.
* libdm: Fix a size_t in _dm_malloc_aligned_aux message.Alasdair G Kergon2018-01-121-1/+1
|
* man: regenerateAlasdair G Kergon2018-01-1243-16/+487
|
* label: Clean up storing of device and label sector.Alasdair G Kergon2018-01-117-44/+40
| | | | | | | | | No longer use the external 'result' pointer internally to set up the cached label. The callback _set_label_read_result() is now given the internal label pointer directly Callers that don't need the result are no longer required to pass a label pointer into label_read().
* config: Move use_mmap to local variable.Alasdair G Kergon2018-01-101-4/+3
|