summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add config setting for dbus notificationdev-dct-notify11David Teigland2016-02-253-1/+7
|
* lvmnotify: add dbus notificationDavid Teigland2016-02-2512-0/+165
| | | | | When a command modifies a PV or VG, it will send a dbus notification when the command is finished.
* Use a common message for a used PVDavid Teigland2016-02-256-18/+15
| | | | | | | Change some inconsistent messages and adopt the new wording "PV %s is used by" in place of "PV %s is marked as belonging to" or "PV %s belongs to".
* pvcreate: fix setting uuid argDavid Teigland2016-02-251-0/+1
| | | | | Commit 4de6caf5 ("redefine pvcreate structs") left out setting the "idp" pointer to the "id" arg.
* tests: add simple dmstats report testsdev-bmr-dmstats-testsBryn M. Reeves2016-02-251-0/+24
| | | | | | | | | | | | Add tests for the "dmstats report" command: * report * report --count * report --histogram So far the tests just check the command runs as expected when a correctly configured stats region exists: validation of output can be added later.
* tests: add dmstats create testsBryn M. Reeves2016-02-251-2/+9
| | | | | | | | | | Add tests for the "dmstats create" command: * simple whole-device region * region using --start/--len options * region using --segments option * region with precise timestamps (--precise) * region with histogram bounds (--bounds)
* tests: make lib/expected-version-dm a dependency of .tests-stampBryn M. Reeves2016-02-251-1/+1
|
* tests: install does not depend on lib/version-expectedBryn M. Reeves2016-02-251-1/+1
| | | | | | The install target already depends on .tests-stamp - since this in turn depends on lib/version-expected there is no need to have this as a dependency of install.
* tests: add template tests/shell/dmstats-create.shBryn M. Reeves2016-02-251-0/+20
| | | | Add a template for testing 'dmstats create' operations.
* tests: add driver_at_least() to aux.shBryn M. Reeves2016-02-251-0/+15
| | | | | Add a function to test whether the running device-mapper driver version is at least equal to some given version.
* tests: add basic dmstats testsBryn M. Reeves2016-02-252-0/+8
| | | | | | | Add initial dmstats tests to 000-basic.sh. These tests ensure that the dmsetup binary is built and linked correctly when called as 'dmstats' and that the version of the binary matches the expected library version used for the build.
* dmstats: create dmstats symlink in test/libBryn M. Reeves2016-02-251-0/+1
| | | | | Create a symbolic link in test/lib for 'dmstats', pointing to the dmsetup binary in the tools/ build directory.
* lvmcache: fix missing free of vginfo->system_id causing mem leakPeter Rajnoha2016-02-251-0/+3
|
* replace pvcreate_params with pvcreate_each_paramsDavid Teigland2016-02-258-99/+64
| | | | | | | | | | "pvcreate_each_params" was a temporary name used to transition from the old "pvcreate_params". Remove the old pvcreate_params struct and rename the new pvcreate_each_params struct to pvcreate_params. Rename various pvcreate_each_params terms to simply pvcreate_params.
* redefine pvcreate structsDavid Teigland2016-02-2513-250/+168
| | | | | | New pv_create_args struct contains all the specific parameters for creating a PV, independent of the command.
* metadata: add fixme about code used only by liblvmDavid Teigland2016-02-251-0/+18
|
* pvremove: use common toollib processing codeDavid Teigland2016-02-254-58/+276
| | | | | Use the new pvcreate_each_device() function from toollib.
* toollib: remove unsed pvcreate params functionDavid Teigland2016-02-252-117/+0
| | | | | which has been replaced by an equivalent pvcreate_each params function.
* liblvm: replace pvcreate_single with pvcreate_volDavid Teigland2016-02-253-25/+10
| | | | And remove the pvcreate_single wrapper.
* vgcreate: use the common toollib pv createDavid Teigland2016-02-255-39/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the new pvcreate_each_device() function from toollib, previously added for pvcreate, in place of the old pvcreate_vol(). This also requires shifting the location where the lock is acquired for the new VG name. The lock for the new VG is supposed to be acquired before pvcreate. This means splitting the vg_lock_newname() out of vg_create(), and calling vg_lock_newname() directly before pvcreate, and then calling the remainder of vg_create() after pvcreate. The new function vg_lock_and_create() now does vg_lock_newname() + vg_create(), like the previous version of vg_create(). The lock on the new VG name is released before the pvcreate and reacquired after the pvcreate because pvcreate needs to reset lvmcache, which doesn't work when locks are held. An exception could likely be made for the new VG name lock, which would allow vgcreate to hold the new VG name lock across the pvcreate step.
* vgextend: use the common toollib pv createDavid Teigland2016-02-251-34/+55
|
* pvcreate: use the common toollib pv createDavid Teigland2016-02-251-51/+92
|
* toollib: add two phase pv processing codeDavid Teigland2016-02-2513-32/+1097
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is common code for handling PV create/remove that can be shared by pvcreate/vgcreate/vgextend/pvremove. This does not change any commands to use the new code. - Pull out the hidden equivalent of process_each_pv into an actual top level process_each_pv. - Pull the prompts to the top level, and do not run any prompts while locks are held. The orphan lock is reacquired after any prompts are done, and the devices being created are checked for any change made while the lock was not held. Previously, pvcreate_vol() was the shared function for creating a PV for pvcreate, vgcreate, vgextend. Now, it will be toollib function pvcreate_each_device(). pvcreate_vol() was called effectively as a helper, from within vgcreate and vgextend code paths. pvcreate_each_device() will be called at the same level as other process_each functions. One of the main problems with pvcreate_vol() is that it included a hidden equivalent of process_each_pv for each device being created: pvcreate_vol() -> _pvcreate_check() -> find_pv_by_name() -> get_pvs() -> get_pvs_internal() -> _get_pvs() -> get_vgids() -> /* equivalent to process_each_pv */ dm_list_iterate_items(vgids) vg = vg_read_internal() dm_list_iterate_items(&vg->pvs) pvcreate_each_device() reorganizes the code so that each-VG-each-PV loop is done once, and uses the standard process_each_pv function at the top level of the function.
* vgconvert: refactor to avoid pvcreate codeDavid Teigland2016-02-253-41/+79
| | | | | | | | This uses the vg->pv_write_list in place of the vg->pvs_to_write list, and eliminates the use of pvcreate_params. The label remove and zeroing steps are shifted out of vg_write() to the higher level like pvcreate will do.
* metadata: use pv_write_list for _check_old_pv_ext_for_vgDavid Teigland2016-02-251-10/+9
| | | | | | The _check_old_pv_ext_for_vg() function only needs to do pv_write(), so it can use the simpler pv_list structs on the pv_write_list.
* metadata: refactor part of add_pv_to_vgDavid Teigland2016-02-252-22/+16
| | | | | | This shifts the use of the 'pv_to_write' struct and the 'pvcreate_params' struct to the one caller of add_pv_to_vg, which is made static.
* vg_write: add list of pvs to writeDavid Teigland2016-02-253-2/+12
| | | | | | | | | | The vg->pv_write_list contains pv_list structs for which vg_write() should call pv_write(). The new list will replace vg->pvs_to_write that contains vg_to_create structs which are used to perform higher-level pvcreate-related operations. The higher level pvcreate operations will be moved out of vg_write() to higher levels.
* configureAlasdair G Kergon2016-02-251-8/+8
|
* configure: require sanlock 3.3.0David Teigland2016-02-241-1/+1
| | | | For a sanlock flag added in that version.
* lvmlockd: use new sanlock flag to avoid blockingDavid Teigland2016-02-241-4/+1
| | | | This flag allows sanlock requests to avoid all blocking.
* tests: include lvmlockd in default make checkdev-dct-make-checkDavid Teigland2016-02-231-1/+6
|
* lvmlockd: fix sparse snapshot caseDavid Teigland2016-02-231-0/+6
| | | | | A snapshot can be created without a real origin LV in this case, so there's no lock to use.
* cleanup: use sizeof instead of macro.Zdenek Kabelac2016-02-231-4/+4
| | | | | Keep the buffer size defined at a single place and then use its sizeof.
* cleanup: use braces around macro paramsZdenek Kabelac2016-02-231-3/+3
|
* coverity: ensure thin_pool_seg is not NULLZdenek Kabelac2016-02-231-1/+3
| | | | thin_pool_seg being NULL would be an internal error.
* coverity: use same arithmetic for both major and minorZdenek Kabelac2016-02-231-1/+1
| | | | Run all arithmetic in the same 'dev_t' type.
* coverity: check for dm_snprintfZdenek Kabelac2016-02-231-1/+2
| | | | Check return state like everywhere else.
* coverity: check cmd pointer existsZdenek Kabelac2016-02-231-1/+1
| | | | | Since in _report_init() we check few times for cmd != NULL keep it consistent and Coverity happier.
* coverity: ensure non-null pointers are usedZdenek Kabelac2016-02-231-1/+2
| | | | | | Here is too complex for Coverity to guess those pointers cannot be NULL, but it's very easy to add little checks here.
* coverity: drop unused assignmentsZdenek Kabelac2016-02-233-6/+7
|
* coverity: check for zero length bufferZdenek Kabelac2016-02-231-1/+4
| | | | | | When get_shared_library_path() would got zero length buffer, it could have underflow in size calc later. So just put extra small check for this case.
* coverity: check for info pointer existanceZdenek Kabelac2016-02-231-2/+4
| | | | | | Since we already check in few other places 'info' is not NULL, do the same for others - however when info would be NULL it more or less looks like internal error.
* coverity: drop unneeded headerZdenek Kabelac2016-02-231-1/+0
|
* libdm: fix string boundaryZdenek Kabelac2016-02-232-2/+4
| | | | | The test for string 'end' needs to account for ending \0, which also needs to fit <SIZE.
* lvmlockd: set default result valueDavid Teigland2016-02-231-0/+2
| | | | | The default error value should be set indicating an error.
* tests: updates for check_lvmlockdDavid Teigland2016-02-239-212/+152
| | | | | | | Move the lvmlockd-related setup functions into aux. For check_lvmlockd_test, start a new instance of lvmlockd --test for each shell test.
* make: Add check_lvmlockd_* targets to top-levelMarian Csontos2016-02-231-1/+1
|
* tests: add SKIP_WITH_LVMLOCKDDavid Teigland2016-02-23222-0/+249
| | | | to all tests that don't already used vgcreate $SHARED
* tests: check warn about belong is printedZdenek Kabelac2016-02-231-3/+6
|
* gcc: logical-op warning go awayZdenek Kabelac2016-02-232-6/+8
| | | | | Don't be too much inventive and shutdown gcc6 warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602