summaryrefslogtreecommitdiffstats
path: root/lib/cache
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-231-1/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* lvmetad: Implement --test (fixes #832033).Petr Rockai2012-07-301-4/+4
|
* activate: add autoactivation hooksPeter Rajnoha2012-06-282-16/+42
| | | | | | | | | | | | | | | | Define an 'activation_handler' that gets called automatically on PV appearance/disappearance while processing the lvmetad_pv_found and lvmetad_pv_gone functions that are supposed to update the lvmetad state based on PV availability state. For now, the actual support is for PV appearance only, leaving room for PV disappearance support as well (which is a more complex problem to solve as this needs to count with possible device stack). Add a new activation change mode - CHANGE_AAY exposed as '--activate ay/-aay' argument ('activate automatically'). Factor out the vgchange activation functionality for use in other tools (like pvscan...).
* lvmetad: check for fid existanceZdenek Kabelac2012-06-221-0/+3
| | | | Fail to update lvmetad with proper log error message.
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-221-2/+0
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* Check if info struct returned is not NULL.Peter Rajnoha2012-04-101-2/+3
| | | | Just some missing checks revealed by Coverity in recent code.
* Minor fixesZdenek Kabelac2012-03-281-2/+1
| | | | Just small updates and remove <backtrace> after log_error.
* Just move declarationZdenek Kabelac2012-03-141-1/+2
|
* Scan all devices for lvmetad if 'pvscan --cache' used without device list.Alasdair Kergon2012-03-032-56/+13
|
* a fixmeAlasdair Kergon2012-03-021-0/+1
|
* fix non-lvmetad pvscan macroAlasdair Kergon2012-03-021-1/+1
|
* missing reply freesAlasdair Kergon2012-03-021-7/+12
|
* Pass struct device around internally rather than dev_t.Alasdair Kergon2012-03-022-42/+100
| | | | | | | Add 3rd daemon return state "unknown" for lookups that are carried out successfully but don't find the item requested. Avoid issuing error messages when it's expected that a device that's being looked up in lvmetad might not be there.
* Change pvscan --lvmetad to pvscan --cache.Alasdair Kergon2012-03-021-1/+1
|
* Allow multiple device names with pvscan --lvmetad.Alasdair Kergon2012-03-022-30/+32
| | | | | | Hold global lock in pvscan --lvmetad. (This might need refinement.) Add PV name to "PV gone" messages. Adjust some log message severities. (More changes needed.)
* Check allocated pointersZdenek Kabelac2012-03-011-24/+25
| | | | | | Test pointers from allocation against NULL. Error paths should be checked, some of them probably need some extesions.
* Check pointer before deref in debug messageZdenek Kabelac2012-03-011-2/+2
|
* Explicitely ignore fail from this label_readZdenek Kabelac2012-03-011-1/+1
|
* Use 64 bit integers for device size & label sector in _pv_populate_lvmcache inPetr Rockai2012-03-011-2/+2
| | | | lvmetad client code. Fixes RHBZ 798267.
* Pass 'single_device' parameter down to suppress 'Can't find uuid' messagesAlasdair Kergon2012-02-291-2/+5
| | | | | | when reading VG text metadate and called from pvscan --lvmetad. (Longer-term, that check needs moving outside of that code.)
* Invert some return codes (which used to get ignored anyway) in cases whenAlasdair Kergon2012-02-281-3/+16
| | | | lvmetad is not being used.
* Bypass lvmetad fns when not configured to use lvmetad.Alasdair Kergon2012-02-281-2/+20
|
* If lvmetad fails, don't set _has_scannedAlasdair Kergon2012-02-281-3/+8
|
* Check result of export_vg_to_bufferZdenek Kabelac2012-02-281-1/+5
| | | | and avoid usage of failed buffer.
* Add stacktrace for init_lvmcache_orphans fail pathZdenek Kabelac2012-02-281-1/+2
|
* Explicitely ignore errors in label_read iteration.Zdenek Kabelac2012-02-281-2/+2
| | | | We don't want stack traces here, so mark as void.
* Check id_write_format resultZdenek Kabelac2012-02-271-4/+9
| | | | | Currently we never fail with 64byte uuid buffer, but just stay consitent with rest of the code and check for result.
* Fix a possible SEGV in lvmetad client code, and a minor leak in pvscanPetr Rockai2012-02-261-2/+5
| | | | --lvmetad.
* A bit of documentation for lvmetad_vg_lookup.Petr Rockai2012-02-261-1/+6
|
* - Improve error reporting on lvmetad connection failure.Petr Rockai2012-02-261-3/+11
| | | | | - Fix a couple of memory leaks in the lvmetad client code. - Avoid an error in lvmetad_pv_gone when we aren't using lvmetad.
* Drop backtrace after log_errorZdenek Kabelac2012-02-231-1/+1
| | | | | Just a minor change to not give backtrace when log_error has been just reported.
* Remaing code sufflingZdenek Kabelac2012-02-231-3/+4
| | | | Move declaration to the front of function to follow coding rules.
* Fix regression from cleanup commitZdenek Kabelac2012-02-231-1/+2
| | | | baton is being modified, so needs to be cleared before each use.
* Some reformating for lvmetad uddatesZdenek Kabelac2012-02-232-107/+134
| | | | | | | cleanup gcc warning, use PRIu64 header cleanups const pointer fixes.
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-234-10/+817
| | | | lvm.conf *and* lvmetad is running.
* Add internal error to guard vgname2 NULL dereferenceZdenek Kabelac2012-02-131-2/+6
|
* FMT_INSTANCE_VG is redundant nowAlasdair Kergon2012-02-121-1/+1
|
* Keep a global (per-format) orphan_vg and keep any and all orphan PVs linked toPetr Rockai2012-02-101-2/+0
| | | | | it. Avoids the need for FMT_INSTANCE_PV and enables further simplifications. No functional change, internal refactor only.
* Move lvmcache data structures behind an API (making the structures private toPetr Rockai2012-02-102-81/+392
| | | | lvmcache.c). No functional change.
* Some fixmesZdenek Kabelac2012-02-081-0/+1
| | | | | 'len' calculation is unused ? Unreachable code could be removed or moved upward ?
* Make a cleaner split between config tree and config file functionality. MovePetr Rockai2011-12-181-1/+1
| | | | the latter out of libdm.
* When dropping the VG metadata from the cache during a VG revert, we mustAlasdair Kergon2011-12-081-0/+4
| | | | reset the 'precomitted' flag, just as we'd clear if we next did a 'commit'.
* Check for refresh_filter failureZdenek Kabelac2011-10-111-5/+3
| | | | | | | | | Properly detect if the filters were refreshed properly. (May needs few more fixes ??) Filter refresh may fail because it may be out of free file descriptors when clvmd gets overloaded.
* Use size_t return typeZdenek Kabelac2011-09-011-2/+2
| | | | Since these function returns buffer size - use size_t type for them.
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-302-4/+4
| | | | | | | leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
* Add detect_internal_vg_cache_corruption to lvm.confZdenek Kabelac2011-08-111-1/+2
| | | | | | | | | | | Add config option to enable crc checking of VG structures. Currently it's disabled by default. For the internal test-suite this check it is enabled. Note: In the case the internal error is detected, debug build with compile option DEBUG_ENFORCE_POOL_LOCKING helps to catch the source of the problem.
* Lock memory for shared VGZdenek Kabelac2011-08-111-0/+8
| | | | | | | | | | | | Use debug pool locking functionality. So the command could check, whether the memory in the pool has not been modified. For lv_postoder() instead of unlocking and locking for every changed struct status member do it once when entering and leaving function. (mprotect would trap each such memory access). Currently lv_postoder() does not modify other part of vg structure then status flags of each LV with flags that are reverted back to its original state after function exit.
* Cache and share generated VG structsZdenek Kabelac2011-08-112-4/+42
| | | | | | | | | Extend vginfo cache with cached VG structure. So if the same metadata are use, skip mda decoding in the case, the same data are in use. This helps for operations like activation of all LVs in one VG, where same data were decoded giving the same output result. Patch adds 1-to-1 connection between volume_group and lvmcache_vginfo.
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-1/+1
| | | | | | | | Move the free_vg() to vg.c and replace free_vg with release_vg and make the _free_vg internal. Patch is needed for sharing VG in vginfo cache so the release_vg function name is a better fit here.
* Slightly refactor the config code to allow better reuse (no functional change).Petr Rockai2011-07-181-2/+1
|