1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

12 Commits

Author SHA1 Message Date
Tony Asleson
eaeb33abd4 liblvm: Save off and restore umask values
lvm has a default umask value in the config file that defaults
to 0077 which lvm changes to during normal operation.  This
causes a problem when the code is used as a library with
liblvm as it is changing the umask for the process.  This
patch saves off the current umask, sets to what is specified
in the config file and restores it what it was on library
function call exit.

The user is now free to change the umask in their application at
anytime including between library calls.

This fix address BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1012113

Tested by setting umask to 0777 and running the python unit
test and verifying that umask is still same value as expected
at the test completion and with a successful run.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-12-20 13:36:22 -06:00
Tony Asleson
04304ba735 lvm2app: Add ability to create PV with args
Add a PV create which takes a paramters object that
has get/set method to configure PV creation.

Current get/set operations include:
- size
- pvmetadatacopies
- pvmetadatasize
- data_alignment
- data_alignment_offset
- zero

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=880395

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-11-19 14:40:34 -06:00
Tony Asleson
5227b65588 lvm2app: Add thin and thin pool lv creation
Add thin and thin pool lv creation support to lvm library

This is Mohan's thinp patch, re-worked to include suggestions
from Zdenek and Mohan.

Rework of commit 4d5de8322b
which uses refactored properties handling.

Based on work done by M. Mohan Kumar <mohan@in.ibm.com>

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-12 16:52:16 -05:00
Alasdair G Kergon
dd302daf64 report: remove LV_CREATE_PARAMS report type
Remove LV_CREATE_PARAMS from lib/report as it is not a type of metadata.
Added by 4d5de8322b
2013-07-09 02:06:29 +01:00
Tony Asleson
4d5de8322b lvm2app: Add thin and thin pool lv creation V5
Add thin and thin pool lv creation support to lvm library

This is Mohan's thinp patch, re-worked to include suggestions
from Zdenek and Mohan.

V2: Remove const lvm_lv_params_create_thin
    Add const lvm_lv_params_skip_zero_get

V3: Changed get/set to use generic functions like current
    property

V4: Corrected macro in properties.c

V5: Fixed a bug in liblvm/lvm_lv.c function lvm_lv_create.
    incorrectly used pool instead of lv_name when doing the
    find_lv_in_vg call.

Based on work done by M. Mohan Kumar <mohan@in.ibm.com>

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-07-02 14:24:33 -05:00
Petr Rockai
8961b1d503 Add getters for copy_percent and snap_percent to the lvm2app API. 2010-12-14 23:20:58 +00:00
Petr Rockai
55429cde3c Add lvm2app function to query pvseg properties.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:12:39 +00:00
Petr Rockai
5de70620ef Add lvm2app function to query lvseg properties.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:09:42 +00:00
Petr Rockai
eeaf3ba70a Implement lvm_vg_set_property() by calling internal 'set' property function.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 19:16:05 +00:00
Dave Wysochanski
3c1febe0a8 Add lvm_vg_get_property() generic vg property function.
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.
2010-10-25 14:08:43 +00:00
Dave Wysochanski
d01a6a2c5c Remove unnecessary list of includes in liblvm files.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-07-09 16:57:34 +00:00
Dave Wysochanski
322633e1f5 Add Doxygen file for lvm2app to generate documentation from lvm2app.h.
A simple Doxygen file for lvm2app documentation.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:54 +00:00