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

20 Commits

Author SHA1 Message Date
Petr Rockai
db22d9b978 This patchset refactors some reporting code and completes the remaining
lvseg properties for lvm2app, 'devices' and 'seg_pe_ranges'.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2011-04-12 12:24:29 +00:00
Zdenek Kabelac
55f6627427 Fix reading of released memory
lvseg_segtype_dup used memory pool vg memory pool for strind duplication.
However this one gets released before reporting happens so the command like:

pvs -o segtype

prints data from already released memory pool. Thanks to the fact there
is not much allocation happing after the VG is released, the memory
stays unmodified and correct result is printed.

Fix adds support for mempool passed parameter (like other similar
query commands) and uses dm_report memory pool for string duplication.
2011-03-05 12:14:00 +00:00
Zdenek Kabelac
aec2115410 Const fixing
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.
2011-02-18 14:47:28 +00:00
Petr Rockai
c1abd569f2 Add the macro and specific 'get' functions for lvsegs.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-17 20:08:14 +00:00
Alasdair Kergon
eacd3a0916 fix header #defines 2010-10-25 12:01:59 +00:00
Dave Wysochanski
d53d92f2e1 Add lv_read_ahead and lv_kernel_read_ahead 'get' functions. 2010-10-21 14:49:31 +00:00
Dave Wysochanski
f1fc310730 Refactor and add code for (lv) 'lv_origin' get function. 2010-10-21 14:49:20 +00:00
Dave Wysochanski
6103254393 Refactor and add code for (lv) 'lv_name' get function. 2010-10-21 14:49:10 +00:00
Dave Wysochanski
2eba846043 Refactor and add code for (lv) 'modules' get function. 2010-10-12 16:13:06 +00:00
Dave Wysochanski
d88090b0ae Refactor and add code for (lv) 'mirror_log' get function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
2010-10-12 16:12:50 +00:00
Dave Wysochanski
40c6c80723 Refactor and add code for (lv) 'lv_kernel_{major|minor}' get functions.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
2010-10-12 16:12:33 +00:00
Dave Wysochanski
e27833fb9c Refactor and add code for (lv) 'convert_lv' get function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
2010-10-12 16:12:18 +00:00
Dave Wysochanski
af579eccc3 Refactor and add code for (lv) 'move_pv' get function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
2010-10-12 16:12:02 +00:00
Dave Wysochanski
29636f38e3 Refactor and add code for (lv) 'origin_size' get function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
2010-10-12 16:11:48 +00:00
Dave Wysochanski
802e252b29 Refactor and add code for (lv) 'lv_path' get function. 2010-10-12 16:11:34 +00:00
Dave Wysochanski
0ca1492ca5 Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch]. 2010-09-30 20:47:18 +00:00
Dave Wysochanski
c508945ca9 Add pv_tags_dup, vg_tags_dup, lv_tags_dup functions that call tags_format_and_copy. 2010-09-30 14:08:19 +00:00
Dave Wysochanski
254d672dcc Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.
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.
2010-09-30 14:07:47 +00:00
Dave Wysochanski
14663348d0 Add {pv|vg|lv}_attr_dup() functions and refactor 'disp' functions.
Move the creating of the 'attr' strings into a common function so
they can be called from the 'disp' functions as well as the new
'get' property functions.
Add "_dup" suffix to indicate memory is allocated.
Refactor pvstatus_disp to take pv argument and call pv_attr_dup().
2010-09-30 13:52:55 +00:00
Dave Wysochanski
e32e2eb011 Add lib/metadata/vg.[ch] and lib/metadata/lv.[ch].
These got missed when git cvsexportcommit was used.
2010-09-30 13:16:55 +00:00