summaryrefslogtreecommitdiffstats
path: root/lib/metadata/lv.c
Commit message (Collapse)AuthorAgeFilesLines
* reports: invalid snaps do not capitalise lv_attrAlasdair G Kergon2012-07-271-1/+0
| | | | | No longer capitalise first LV attribute char for invalid snapshots. This state is available from the 5th char now (I or S).
* Fix missing breakZdenek Kabelac2012-02-271-0/+1
| | | | | | Bug introduced with addition of internal error default case. Seem like this code is not used. TODO: add coverage test.
* Add explicit cast for time() ret valueZdenek Kabelac2012-02-231-1/+1
| | | | To keep all numbers with same sign
* Add internal error for unsupported code pathsZdenek Kabelac2012-02-131-0/+3
| | | | | Patch mainly helps static analyzers to better work with code paths lvm code should never trigger.
* Use chunk_size consistently for thin_pool within LVM.Alasdair Kergon2012-01-241-1/+1
|
* Use m and M lv_attr to indicate that a snapshot merge failed in lvs.Mike Snitzer2012-01-201-8/+15
| | | | snapshot (m)erge failed, suspended snapshot (M)erge failed
* Thin cleanupZdenek Kabelac2012-01-201-10/+8
| | | | Reorder condition so the code is better readable (and shorter).
* Drop hack in segtype reportingZdenek Kabelac2012-01-201-4/+0
| | | | | | | | | | Since striped name function knows when to report 'linear' instead of 'stripe' type name - drop it from this place. This fixes problem when reporting segtype e.g. for thin-pool which is also using area_count=1 to store thin data device reference. It also returns properly strduped memory instead of badly casted const char*.
* Thin add new display field for lvsZdenek Kabelac2012-01-191-1/+21
| | | | | | | 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.
* Add support to keep info about creation time and host for each LVZdenek Kabelac2012-01-191-0/+61
| | | | | | | | Basic support to keep info when the LV was created. Host and time is stored into LV mda section. FIXME: Current version doesn't support configurable string via lvm.conf and used fixed version strftime "%Y-%m-%d %T %z".
* Show read-only activation in display tools.Alasdair Kergon2012-01-121-0/+7
|
* Add 'Volume Type' lv_attr characters for RAID and RAID_IMAGE.Jonathan Earl Brassow2011-09-231-0/+46
| | | | RAID_META is already handled.
* Add suggest parentheses around '&&'Zdenek Kabelac2011-09-141-2/+2
| | | | Follow gcc suggestion.
* Append z to lv_attr if new blocks will be zeroed.Alasdair Kergon2011-09-091-1/+9
|
* Add a new 'thin_pool' output field to 'lvs.Alasdair Kergon2011-09-091-0/+12
| | | | | | | | | 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.
* Add 7th lv_attr char to show the related kernel target.Alasdair Kergon2011-09-081-8/+31
| | | | Add thin volume types to lv_attr.
* This patchset refactors some reporting code and completes the remainingPetr Rockai2011-04-121-0/+82
| | | | | | | lvseg properties for lvm2app, 'devices' and 'seg_pe_ranges'. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* s/MIRROR_NOTSYNCED/LV_NOTSYNCED/ - Flag will may refer to more than just mirrorsJonathan Earl Brassow2011-03-291-1/+1
|
* Use empty string instead of /dev// for LV path when there's no VG.Alasdair Kergon2011-03-091-0/+4
| | | | Don't allocate unused VG mempool in _pvsegs_sub_single.
* Fix reading of released memoryZdenek Kabelac2011-03-051-2/+2
| | | | | | | | | | | | | | 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.
* Refactor the percent (mirror sync, snapshot usage) handling code to usePetr Rockai2010-11-301-8/+6
| | | | fixed-point values instead of a combination of a float value and an enum.
* Add the macro and specific 'get' functions for lvsegs.Petr Rockai2010-11-171-0/+35
| | | | | Signed-off-by: Dave Wysochanski <wysochanski@pobox.com> Reviewed-by: Petr Rockai <prockai@redhat.com>
* pre-releaseAlasdair Kergon2010-10-251-0/+1
|
* Add lv_read_ahead and lv_kernel_read_ahead 'get' functions.Dave Wysochanski2010-10-211-0/+9
|
* Refactor and add code for (lv) 'lv_origin' get function.Dave Wysochanski2010-10-211-0/+7
|
* Refactor and add code for (lv) 'lv_name' get function.Dave Wysochanski2010-10-211-0/+5
|
* Fix lv_modules_dup segfault.Dave Wysochanski2010-10-121-1/+1
|
* Refactor and add code for (lv) 'modules' get function.Dave Wysochanski2010-10-121-0/+15
|
* Refactor and add code for (lv) 'mirror_log' get function.Dave Wysochanski2010-10-121-0/+13
| | | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-By: Petr Rockai <prockai@redhat.com>
* Refactor and add code for (lv) 'lv_kernel_{major|minor}' get functions.Dave Wysochanski2010-10-121-0/+17
| | | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-By: Petr Rockai <prockai@redhat.com>
* Refactor and add code for (lv) 'convert_lv' get function.Dave Wysochanski2010-10-121-0/+15
| | | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-By: Petr Rockai <prockai@redhat.com>
* Refactor and add code for (lv) 'move_pv' get function.Dave Wysochanski2010-10-121-0/+11
| | | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-By: Petr Rockai <prockai@redhat.com>
* Refactor and add code for (lv) 'origin_size' get function.Dave Wysochanski2010-10-121-0/+9
| | | | | Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Reviewed-By: Petr Rockai <prockai@redhat.com>
* Refactor and add code for (lv) 'lv_path' get function.Dave Wysochanski2010-10-121-0/+22
|
* Fix copyright dates on new files lib/metadata/{lv|vg|pv}.[ch].Dave Wysochanski2010-09-301-1/+2
|
* Add pv_tags_dup, vg_tags_dup, lv_tags_dup functions that call ↵Dave Wysochanski2010-09-301-0/+5
| | | | tags_format_and_copy.
* Add pv_uuid_dup, vg_uuid_dup, and lv_uuid_dup, and call id_format_and_copy.Dave Wysochanski2010-09-301-0/+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.
* Simplify logic to create 'attr' strings.Dave Wysochanski2010-09-301-24/+6
| | | | | | This patch addresses code review request to simplify creation of 'attr' strings. The simplification is done in this separate patch to more easily review and ensure the simplification is done without error.
* Add {pv|vg|lv}_attr_dup() functions and refactor 'disp' functions.Dave Wysochanski2010-09-301-0/+118
| | | | | | | | 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 lib/metadata/vg.[ch] and lib/metadata/lv.[ch].Dave Wysochanski2010-09-301-0/+21
These got missed when git cvsexportcommit was used.