| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
| |
Global change from --discard to --discards, as that feels more natural.
|
|
|
|
|
|
|
|
|
| |
I think it's better not to abbreviate human-readable fields like
'discard' to a single character. Users can truncate it to the
first character themselves if they wish.
It's confusing to use the variable name discard for different things in
different places - use discard_str when it's a string not the enum.
|
|
|
|
|
|
|
|
|
|
| |
New field "discard" is added for lvs reporting of lv segment.
Reported as one character:
(i)gnore
(n)opassdown
(p)assdown
lvs -o+discard
|
|
|
|
|
|
| |
Using report_type_t for bitmask is not correct, since we have not defined types
for all bit combinations - so switching to unsigned type, since values of
report_type_t enum are unsigned.
|
|
|
|
|
| |
Since we only need layered device - check for tpool device presence,
so user doesn't need to activate thin pool explicitely for percent info.
|
| |
|
|
|
|
|
|
|
| |
New field Data% is able to display info about
thin_pool, thin, snapshot and has generic meaning here.
Simple Time/Host field are here to display host and time creation.
|
|
|
|
|
|
|
| |
Full support for thin snapshots.
Create and remove is supported.
TODO: lvconvert support is not yes available.
|
| |
|
|
|
|
|
|
|
|
|
| |
A gentle reminder that anyone relying on the output of reporting commands
like lvs in scripts must use -o to guarantee they get the fields they expect.
The default sequence of fields can change from release to release.
Equally, the 'attr' fields can have new values introduced and/or characters
appended to them.
|
|
|
|
| |
Static analyzis noticed we do not really need them - so removing.
|
|
|
|
|
|
|
| |
lvseg properties for lvm2app, 'devices' and 'seg_pe_ranges'.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If the percent value could not be determined return PERCENT_INVALID.
Indent function with tabs.
|
| |
|
|
|
|
| |
fixed-point values instead of a combination of a float value and an enum.
|
|
|
|
|
|
|
| |
Fix 'seg_size' to return bytes.
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>
|
|
|
|
| |
the previous patch set.
|
|
|
|
|
|
|
|
| |
Similar to 'get' property internal functions.
Add specific 'set' function for vg_mda_copies.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Add 'is_integer' flag similar to 'is_string'.
Suggested in review by Petr Rockai.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Based on review comments, rename a few fields in lvm_property_type.
In particular, change 'is_writeable' to 'is_settable', which is
more intuitive to the intent of the bitfield (a 'set' function
exists for this field/property). Also, remove the char array
for 'id' - unnecessary as we can just use the string passed in
to do the strcmp. Finally rename the union members from n_val
to 'integer' and 's_val' to 'string'.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
| |
|
|
|
|
|
| |
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Reviewed-By: Petr Rockai <prockai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to use a similar function for pv and lv properties, so just make
a generic _get_property() function that contains most of the required
functionality. Also, add a check to ensure the field name matches the
object passed in by re-using report_type_t enum. For pv properties,
the report_type might be either PVS or LABEL.
In addition, add 'const' to 'get' functions object parameter, but not
'set' functions. Add _not_implemented_set() and _not_implemented_get()
functions.
|
|
|
|
|
|
| |
Add 'get' functions for all pv properties.
Multiply by SECTOR_SIZE for pv properties pv_mda_free, pv_mda_size,
pe_start, pv_size, pv_free, pv_used.
|
| |
|
|
|
|
|
|
| |
Add 'get' functions based on generic macros for VG, PV, and LV.
Add 'get' functions for vg string fields, vg_name, vg_fmt, vg_sysid,
vg_uuid, vg_attr, and vg_tags, and all numeric fields.
|
|
|
|
|
| |
Will need similar macros for VG, PV and LV, so define a generic one, and just
pass in the struct name and variable name for the specific macro.
|
|
|
|
|
|
| |
Add a common function to allocate memory and format a string of
tags.
Call tags_format_and_copy() from _tags_disp().
|
|
|
|
|
| |
Add supporting uuid function to allocate memory and call id_write_format.
Call id_format_and_copy from _uuid_disp.
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add 'get' functions based on the simple macro function definition for a
numeric property.
Add 'get' functions for the following: _vg_extent_count_get,
_vg_free_count_get, _max_lv_get, _max_pv_get, _pv_count_get,
_lv_count_get, _snap_count_get, _vg_seqno_get, _vg_size_get,
_vg_free_get, vg_mda_*.
For size functions, multiply by SECTOR_SIZE to return the value in bytes.
|
| |
|
|
|
|
|
|
|
|
| |
The 'id' entries in columns.h are the report field names. Since these are
unique, we'd like to use them in generation of 'get' / 'set' functions.
As a step towards using them for this purpose, remove the explicit double
quotes and use the macro '#' character to add the double quotes back when
placing them into the '_fields' array 'id' member.
|