summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* toollib: rename flagdev-dct-process-v11David Teigland2014-04-163-21/+21
| | | | Use a more descriptive name.
* vgimport: fix all optionDavid Teigland2014-04-151-1/+1
| | | | toollib rework hadn't enabled "all vgs" for vgimport.
* toollib: rename tags function argDavid Teigland2014-04-151-4/+4
| | | | to avoid conflict with any global definition.
* test: add process-each-pv-nomdaDavid Teigland2014-04-151-0/+27
|
* test: add process-each-pv and process-each-pvresizeDavid Teigland2014-04-152-0/+1846
|
* toollib: rewrite process_each_pvDavid Teigland2014-04-158-370/+407
| | | | | | Process pvs by iterating through vgs, then iterating through devs if the command wants to process non-pv devices. The process_single function can always use the vg and pv args.
* toollib: add ENABLE_ALL_DEVS flagDavid Teigland2014-04-152-2/+3
| | | | | | | The ENABLE_ALL_DEVS flag is added to the command structure for commands that should process all devs (pvs and non-pvs) when they call process_each_pv and the command includes the --all arg. This will be used in a later process_each_pv patch.
* toollib: remove unused arg from process_each_lv_in_vgDavid Teigland2014-04-153-4/+2
| | | | | The failed_lvnames arg is no longer used since the cmd_vg replicator wrapper was removed.
* toollib: improve error message in process_each_lv_in_vgDavid Teigland2014-04-151-6/+11
| | | | Include in the error message the lv name args that were not found.
* toollib: rewrite process_each_lvDavid Teigland2014-04-151-297/+334
| | | | | | - Copy the same form as the new process_each_vg. - Replace unused struct cmd_vg and cmd_vg_read() replicator code with struct vg and vg_read() directly.
* toollib: rewrite process_each_vgDavid Teigland2014-04-151-145/+233
| | | | | | | | - Split the collecting of arguments from processing them. - The split allows the two different loops through vgs to be replaced by a single loop. - Replace unused struct cmd_vg and cmd_vg_read() replicator code with struct vg and vg_read() directly.
* toollib: add ENABLE_ALL_VGS flagDavid Teigland2014-04-152-13/+19
| | | | | | | The ENABLE_ALL_VGS flag is added to the command structure for commands that should process all vgs when they call process_each_vg or process_each_lv with no args. This will be used in later patches to process_each functions.
* lvmdump: list also inactive units for lvmdump -sPeter Rajnoha2014-04-151-1/+1
|
* lvmdump: add -s to gather system info and context (currently systemd-related ↵Peter Rajnoha2014-04-153-6/+48
| | | | | | | | | | | | only) This is sort of info we always ask people to retrieve when inspecting problems in systemd environment so let's have this as part of lvmdump directly. The -s option does not need to be bound to systemd only. We could add support for initscripts or any other system-wide/service tracking info that can help us with debugging problems.
* profiles: comment out thin_pool_chunk_size in default.profilePeter Rajnoha2014-04-151-11/+8
| | | | | | | | | | | By default, the thin_pool_chunk_size is automatically calculated. When defined, it disables the automatic calculation. So to be more precise here, we should comment it out for the default.profile. Also, "lvm dumpconfig --type profilable" was used here to generate the default.profile content. This will be done automatically in the future once we have the infrastructure for this in (see also https://bugzilla.redhat.com/show_bug.cgi?id=1073415).
* alloc: Correct existing use of positional fill.Alasdair G Kergon2014-04-151-17/+27
| | | | | | | | | Perform two allocation attempts with cling if maximise_cling is set, first with then without positional fill. Avoid segfaults from confusion between positional and sorted sequential allocation when number of stripes varies as reported here: https://www.redhat.com/archives/linux-lvm/2014-March/msg00001.html
* alloc: Introduce A_POSITIONAL_FILL.Alasdair G Kergon2014-04-152-9/+24
| | | | | | | Set A_POSITIONAL_FILL if the array of areas is being filled positionally (with a slot corresponding to each 'leg') rather than sequentially (with all suitable areas found, to be sorted and selected from).
* alloc: Access alloc_parms from alloc_state.Alasdair G Kergon2014-04-151-4/+9
| | | | alloc_parms is constant while allocating.
* tests: correct test conditionZdenek Kabelac2014-04-141-1/+1
| | | | Abort loop when PIDFILE is gone
* tests: check there is really pvmove lvZdenek Kabelac2014-04-141-6/+15
| | | | | | | | | | | Since the kill may take various amount of time, (especially when running with valgrind) check it's really pvmoved LV. Restore initial restart of clvmd - it's currently broken at various moments - basically killed lvm2 command may leave clvmd and confusing state leading to reports of internal errors.
* tests: implement lv_attr_bitZdenek Kabelac2014-04-141-1/+20
| | | | Add easy check function for cheking lv_attr bits
* cleanup: corrent indent levelZdenek Kabelac2014-04-141-17/+17
|
* cleanup: clvmd drop unused enum stateZdenek Kabelac2014-04-141-1/+1
|
* cleanup: clvmd reindent local_pipe_callbackZdenek Kabelac2014-04-141-15/+16
| | | | | Move !node_up check in front and reindent rest of the function to the left.
* clvmd: use thread-safe ctime_r when debuggingZdenek Kabelac2014-04-142-1/+3
| | | | | Use thread friendly version of ctime TODO:should be probably replaced with strftime()
* clvmd: skip adding reply when finishedZdenek Kabelac2014-04-142-11/+16
| | | | | | | Prior adding new reply to the list, check if the reply thread is not already finished. In that case discard adding message (which would otherwise be leaked).
* clvmd: improve mutex usage in request_timed_outZdenek Kabelac2014-04-142-8/+13
| | | | | | | | Use mutex to access localsock values, so check num_replies when the thread is not yet finished. Check for threadid prior the mutex taking (though this check is probably not really needed)
* clvmd: drop reply_mutexZdenek Kabelac2014-04-143-10/+5
| | | | | | | Added complexity with extra reply mutex is not worth the troubles. The only place which may slightly benefit from this mutex is timeout and since this is rather error case - let's convert it to localsock.mutex and keep it simple.
* clvmd: set finished flag with mutexZdenek Kabelac2014-04-142-2/+3
| | | | Setting this variable needs to be protected with mutex.
* clvmd: move mutex init and detroyZdenek Kabelac2014-04-142-12/+8
| | | | | | | | | | Move the pthread mutex and condition creation and destroy to correct place right after client memory is allocatedd or is going to be released. In the original place it's been in race with lvm thread which could have still unlock mutex while it's been already destroyed.
* clvmd: fix test mode raceZdenek Kabelac2014-04-144-28/+19
| | | | | | | | | | When TEST_MODE flag is passed around the cluster, it's been use in thread unprotected way, so it may have influenced behaviour of other running parallel lvm commands (activation/deactivation/suspend/resume). Fix it by set/query function only under lvm mutex. For hold_un/lock function calls check lock_flags bits directly.
* memlock: ignore more librariesZdenek Kabelac2014-04-142-1/+8
| | | | | Extend the list of ignored libraries. Since we do not use those libraries during suspend, skip their locking.
* pvmove: remove locked flag from error pvmove0Zdenek Kabelac2014-04-142-1/+2
| | | | | | | | When pvmove0 is finished, it replaces temporarily pvmove0 with error segment, however in this case, pvmove0 remains unremovable in case pvmove --abort is interrupted in this moment - since it's not a pvmove anymore and normal lvremove can't be used to remove LOCKED lv.
* polldaemon: ret invalid cmd for negative intervalZdenek Kabelac2014-04-142-1/+4
| | | | Negative intervals are not supported.
* alloc: Refactor area reservation code.Alasdair G Kergon2014-04-101-53/+53
| | | | No functional changes intended to be included in this patch.
* post-releaseAlasdair G Kergon2014-04-104-2/+8
|
* pre-releasev2_02_106Alasdair G Kergon2014-04-104-18/+15
|
* tests: add test for pvcreate --dataalignment --dataalignmentoffset ↵Peter Rajnoha2014-04-102-4/+21
| | | | | | | --restorefile compatibility Also, avoid division by zero in the pvcreate's param validation in case someone supplies "pvcreate --dataalignment 0".
* tests: add separate test file for bootloader area support and enhance testsPeter Rajnoha2014-04-103-25/+62
| | | | | Enahnce bootloader area test to check whether restoring values from backup works correctly.
* pvcreate: fix ignored --dataalignment/dataalignment offset for pvcreate ↵Peter Rajnoha2014-04-102-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --restorefile There were two bugs before when using pvcreate --restorefile together with data alignment and its offset specified: - the --dataalignment was always ignored due to missing braces in the code when validating the divisibility of supplied --dataalignment argument with pe_start which we're just restoring: if (pp->rp.pe_start % pp->data_alignment) log_warn("WARNING: Ignoring data alignment %" PRIu64 " incompatible with --restorefile value (%" PRIu64").", pp->data_alignment, pp->rp.pe_start); pp->data_alignment = 0 The pp->data_alignment should be zeroed only if the pe_start is not divisible with data_alignment. - the check for compatibility of restored pe_start was incorrect too since it did not properly count with the dataalignmentoffset that could be supplied together with dataalignment The proper formula is: X * dataalignment + dataalignmentoffset == pe_start So it should be: if ((pp->rp.pe_start % pp->data_alignment) != pp->data_alignment_offset) { ...ignore supplied dataalignment and dataalignment offset... }
* tests: add some coverage for bootloader areasPeter Rajnoha2014-04-091-0/+22
|
* lvmetad: fix lost bootloader area informationPeter Rajnoha2014-04-092-1/+2
| | | | | | The refactoring made by 732859d21f3b41bdb188f92b60f25d5c94dcee8a caused this. The former "ea" was not renamed to "ba" and we used incorrect tree node name to search for the value.
* tests: check prohibited namesZdenek Kabelac2014-04-081-0/+8
|
* cleanup: libdm drop already zeroed elementsZdenek Kabelac2014-04-081-11/+0
| | | | Drop zeroing of zalloc-ed memory.
* cleanup: reindent returnZdenek Kabelac2014-04-081-2/+2
| | | | Since the return here is the only path, reindent for readability.
* cleanup: update commentsZdenek Kabelac2014-04-081-2/+2
| | | | Fix cut&paste comments
* cleanup: do include lvm headers in libdm buildZdenek Kabelac2014-04-082-8/+8
| | | | | Relocate some defines from lvm headers to those few shared between libdm and lib code.
* cleanup: use DM_ARRAY_SIZEZdenek Kabelac2014-04-089-14/+13
| | | | More use of libdevmapper macro
* cleanup: refactor apply_lvname_restrictionsZdenek Kabelac2014-04-081-28/+37
| | | | | | | | Split apply_lvname_restrictions into 2 internal function: _lvname_has_reserved_prefix() _lvname_has_reserved_string()
* debug: catch invalid request for treeZdenek Kabelac2014-04-081-0/+6
| | | | | | In general for non-toplevel LVs we shouldn't allow any _tree_action. For now error on request for cache_pool activation which doesn't even exist in dm-table.