summaryrefslogtreecommitdiffstats
path: root/liblvm
Commit message (Collapse)AuthorAgeFilesLines
* lvm2api: extend lvm2api with lvm_lv_renameZdenek Kabelac2012-08-272-0/+26
| | | | Add support for LV rename.
* buffering: use unbuffered silent mode for liblvmAlasdair G Kergon2012-08-261-1/+1
| | | | | | Disable private buffering when using liblvm. When private stdin/stdout buffering is not used always use silent mode.
* lvmapi: validate extents size for lvcreateZdenek Kabelac2012-08-231-5/+8
|
* lvm2app: add lvm_config_find_bool functionPeter Rajnoha2012-07-312-0/+27
| | | | To effectively retrieve the setting of anything that could be enabled or disabled.
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-222-4/+3
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* Initialize dmeventd monitoring for every commandZdenek Kabelac2012-02-151-1/+0
| | | | | | | | | | 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.
* Add internal error for unsupported code pathsZdenek Kabelac2012-02-131-3/+10
| | | | | Patch mainly helps static analyzers to better work with code paths lvm code should never trigger.
* Remove duplicate testZdenek Kabelac2012-02-082-10/+10
| | | | | | Tested condition has been already evaluated before For strlen() code has already excluded <ID_LEN. For repairing, already tested (!argc && !repairing) before.
* Add missing deps for lvm2apiZdenek Kabelac2012-02-081-1/+3
| | | | Hmm, wasted some time because of this missing deps....
* Differentiate between snapshot status of "Invalid" and "Merge failed".Mike Snitzer2012-01-201-1/+2
|
* Only use built-in stack size in clvmd - ignore lvm.conf.Alasdair Kergon2011-12-081-1/+1
|
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-4/+4
| | | | | | | | 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.
* Add proper udev library context initialization and finalization to liblvm.Peter Rajnoha2011-06-151-0/+4
| | | | | | | | 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.
* Permit --available with lvcreate so non-snapshot LVs need not be activated.Alasdair Kergon2011-06-011-0/+1
|
* When glibc needs buffers for line buffering of input and output buffers, itPetr Rockai2011-05-071-1/+1
| | | | | | | | | | | | 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>
* Finalize PV format instances properly in lvm_vg_write fn.Peter Rajnoha2011-04-011-0/+1
| | | | | 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.
* Const fixingZdenek Kabelac2011-02-181-2/+2
| | | | | | | | | | | | | | | | 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.
* Do not check for open_count when not needed.Zdenek Kabelac2011-02-031-2/+2
| | | | | | Disable open_count checking in lv_info it it's not used. Fix previous commit (comment out unsable code for now).
* Add default error path for get_propertyZdenek Kabelac2011-01-101-15/+11
| | | | | | Set invalid property value for error path when NULL handler is passed. Fixes use of uninitialized prop structure as we return 'v' by value. ---
* Fix wrong cast to char*Zdenek Kabelac2010-12-201-1/+1
| | | | | As cmd->cmd_line is already const char pointer it's not needed to cast already const char pointer to char pointer.
* Add getters for copy_percent and snap_percent to the lvm2app API.Petr Rockai2010-12-147-8/+35
|
* Rename vg_release to free_vg.Alasdair Kergon2010-12-081-4/+4
|
* This patch adds helpers to allow users to lookup a lv or pv handle byPetr Rockai2010-11-253-0/+82
| | | | | | | uuid (given a vg_t of course). Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* This patch adds helpers to allow users to lookup a lv or pv handle byPetr Rockai2010-11-253-0/+57
| | | | | | | name (given a vg_t of course). Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add lvm2app function to query pvseg properties.Petr Rockai2010-11-176-6/+56
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add a new type and function to lvm2app to enumerate pvsegs.Petr Rockai2010-11-172-0/+58
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add lvm2app function to query lvseg properties.Petr Rockai2010-11-176-5/+57
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Add a new type and function to lvm2app to enumerate lvsegs.Petr Rockai2010-11-172-0/+58
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Implement lvm_vg_set_property() by calling internal 'set' property function.Petr Rockai2010-11-174-0/+68
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* Support repetition of --addtag and --deltag arguments.Alasdair Kergon2010-11-111-1/+1
| | | | | 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 lvm_lv_get_property() generic function to obtain value of any lv propertDave Wysochanski2010-10-252-0/+43
| | | | | | 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 lvm_pv_get_property() generic function to obtain value of any pv property.Dave Wysochanski2010-10-252-0/+44
| | | | | | | 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 lvm_vg_get_property() generic vg property function.Dave Wysochanski2010-10-254-1/+107
| | | | | | | | | | | | | 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 pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.Dave Wysochanski2010-09-303-23/+5
| | | | | | | 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.
* Allow internal suspend and resume of origin without its snapshots.Alasdair Kergon2010-08-171-2/+2
|
* Clean generated files .exported_symbols_generated, example.conf for distclean.Zdenek Kabelac2010-08-031-1/+1
|
* Use #include <> not "" in lvm2app.h which gets installed on the system.Alasdair Kergon2010-08-021-1/+1
|
* More comment updates in lvm2app.h.Dave Wysochanski2010-07-121-38/+38
|
* Update comments about memory handling in lvm2app.h.Dave Wysochanski2010-07-121-4/+4
|
* Remove unnecessary list of includes in liblvm files.Dave Wysochanski2010-07-094-17/+4
| | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-093-3/+3
|
* Refactor vg_remove_check to place pv removal into separate function.Dave Wysochanski2010-06-301-0/+2
|
* Generate liblvm2app and libdevmapper exported symbols from header files.Alasdair Kergon2010-06-252-63/+3
| | | | | Detection is simply by prefix - dm_ or lvm_ - and any additional symbols needed but not detected this way are placed in .exported_symbols.
* actually, let's keep these in same order as in headerAlasdair Kergon2010-06-251-44/+44
|
* Update liblvm2app exported symbols.Alasdair Kergon2010-06-252-39/+50
| | | | Add Makefile target to generate current list of lvm2app.h functions.
* Remove C++ private keyword from headers.Milan Broz2010-06-161-0/+6
| | | | Add extern C definition for libdevmapper, lvm2app and lvm2cmd.
* Fix warnings with conversion of uuid.Dave Wysochanski2010-05-191-3/+3
| | | | | More cleanup of uuid casting / structures is needed but for now just cast like the rest of the code.
* Add lvm2app interfaces to lookup a vgname from a pvid and pvname.Dave Wysochanski2010-05-193-1/+61
| | | | | | | | | | | 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.
* Add pkgconfigdir for placement of .pc filesZdenek Kabelac2010-05-111-1/+1
| | | | Use easily overideable make install pkgconfigdir variable.
* Switch to use Requires.private for devmapper.pc and lvm2app.pcZdenek Kabelac2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | 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