| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Add support for LV rename.
|
|
|
|
|
|
| |
Disable private buffering when using liblvm.
When private stdin/stdout buffering is not used always use silent
mode.
|
| |
|
|
|
|
| |
To effectively retrieve the setting of anything that could be enabled or disabled.
|
|
|
|
|
| |
Simplifies the code, properly detects too long socket paths,
drops unused parameter.
|
|
|
|
|
|
|
|
|
|
| |
Read lvm.conf setting for monitoring for each command. So we should not
activate monitoring if the default compilation is set to monitor during
lvconvert commnads.
Patch also removes check for clustered VG and allows to disable monitoring
for clustered VG with the assumption, the problem with monitoring and dmeventd
flag passing for INGNORE is already fixed.
|
|
|
|
|
| |
Patch mainly helps static analyzers to better work with code paths
lvm code should never trigger.
|
|
|
|
|
|
| |
Tested condition has been already evaluated before
For strlen() code has already excluded <ID_LEN.
For repairing, already tested (!argc && !repairing) before.
|
|
|
|
| |
Hmm, wasted some time because of this missing deps....
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This was missing in liblvm and it caused all udev-related operations to
not take effect when using liblvm, e.g. obtaining the list of devices from udev
db instead of scanning the whole /dev which also recreated the .cache as a side
effect. This was also the case with udisks-lvm-pv-export prober which is run
from within udev rules whenever the CHANGE event is fired.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocates these buffers in such way it adds memory page for each such buffer
and size of unlock memory check will mismatch by 1 or 2 pages.
This happens when we print or read lines without '\n' so these buffers are
used. To avoid this extra allocation, use setvbuf to set these bufffers ahead.
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
lvm_vg_write fn reinitializes the vg->removed_pvs list. We have to finalize
all PV format instances attached to PVs found in the original list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing some const warnings - with API change in:
int vg_extend(struct volume_group *vg, int pv_count, const char *const *pv_names,
Change is needed - as lvm2api expects const behaviour here.
So vg_extend() is doing local strdup for unescaping.
skip_dev_dir return const char* from const char* vg_name.
Rest of the patch is cleanup of related warnings.
Also using dm_report_filed_string() API change to simplify
casting in _string_disp and _lvname_disp.
|
|
|
|
|
|
| |
Disable open_count checking in lv_info it it's not used.
Fix previous commit (comment out unsable code for now).
|
|
|
|
|
|
| |
Set invalid property value for error path when NULL handler is passed.
Fixes use of uninitialized prop structure as we return 'v' by value.
---
|
|
|
|
|
| |
As cmd->cmd_line is already const char pointer it's not needed to cast already
const char pointer to char pointer.
|
| |
|
| |
|
|
|
|
|
|
|
| |
uuid (given a vg_t of course).
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
|
|
| |
name (given a vg_t of course).
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Add infrastructure for specific cmdline arguments to be repeated in groups.
Split the_args cmdline arguments and values into arg_props and arg_values.
|
|
|
|
|
|
| |
Add a generic LV property function to lvm2app, similar to VG function.
Return lvm_property_value and require caller to check 'is_valid' flag
and lvm_errno() for API error.
|
|
|
|
|
|
|
| |
Add a generic PV property function to lvm2app, similar to VG function.
Return lvm_property_value and require caller to check 'is_valid' flag
before using the value. If 'is_valid' is not set, then lvm_errno()
should be used to obtain the specific error.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a generic VG property function to lvm2app. Call the internal library
vg_get_property() function. Strings are dup'd internally.
Rework lvm_vg_get_property to return lvm_property_value and require caller
to check 'is_valid' flag. If !is_valid, the caller can check lvm_errno()
for the specific error.
Create a 'get_property' function, local to lvm2app, that factors out
most of the common code that copies the components of lvm_property_type
into lvm_property_value. This allows for a 1-line function for each
of the generic property functions exported by lvm2app.
|
|
|
|
|
|
|
| |
Add supporting functions for pv_uuid, vg_uuid, and lv_uuid.
Call new function id_format_and_copy. Use 'const' where appropriate.
Add "_dup" suffix to indicate memory is being allocated.
Call {pv|vg|lv}_uuid_dup from lvm2app uuid functions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
|
| |
|
| |
|
|
|
|
|
| |
Detection is simply by prefix - dm_ or lvm_ - and any additional symbols needed
but not detected this way are placed in .exported_symbols.
|
| |
|
|
|
|
| |
Add Makefile target to generate current list of lvm2app.h functions.
|
|
|
|
| |
Add extern C definition for libdevmapper, lvm2app and lvm2cmd.
|
|
|
|
|
| |
More cleanup of uuid casting / structures is needed but for now just
cast like the rest of the code.
|
|
|
|
|
|
|
|
|
|
|
| |
lvm2app forces applications to start with a volume group name,
open the volume group, then operate on individual pvs. In some
cases the application may want to start with a device name rather
than the volume group name. Today, if an application wants to
do this, it must iterate through all the volume groups to find
the volume group that the specific device is attached to.
These new interfaces allow the application to avoid such overhead.
Bump the lvm2app version number to 3.
|
|
|
|
| |
Use easily overideable make install pkgconfigdir variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use Requires.private: instead of Libs.private:
Use UDEV_PC and SELINUX_PC for Require.private:
It looks like usage of Requires.private is prefered from Libs.private.
However pkg-config documentation is really poor here. But here is
short outcome:
There is a difference in Libs.private: and Requires.private: where
we specify libselinux instead of -lselinux -lsepol.
We leave resolving of query like 'pkg-config --libs --static devmapper'
on taking proper selinux and udev libs to their .pc files instead of
hardcoding them into our .pc file which is might give incorrect answer.
- i.e. dependency of libselinux package might change and we may return
wrong list of linked libraries.
http://bugs.freedesktop.org/show_bug.cgi?id=4738
http://err.no/personal/blog/tech/2008-03-25-18-07_pkg-config,_sonames_and_Requires.private
|