summaryrefslogtreecommitdiffstats
path: root/lib/format1
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor format1 vg->pvs list add and vg->pv_count.Dave Wysochanski2010-04-063-8/+6
| | | | | | | Refactor adding to the vg->pvs list and incrementing the count, which will allow further refactoring. Should be no functional change. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
* Change most remaining log_error WARNING messages to log_warn.Alasdair Kergon2010-04-011-3/+3
|
* Use $(top_builddir) for inclusion of make.tmpl in Makefiles.Zdenek Kabelac2010-03-041-1/+1
|
* Cleanup returns for void functions.Zdenek Kabelac2009-12-112-2/+0
|
* Recognise DRBD device part and handle it similar to MD devices.Milan Broz2009-10-271-3/+4
| | | | | | | | | | | | | The DRBD uses underlying device so code should prefer top device if duplicate is found. Patch also introduce dev_subsystem_part_major and dev_subsytem_name functions to easily handle all these replication susbystems and not hardcode md_major call. See https://bugzilla.redhat.com/show_bug.cgi?id=530881 for full problem description.
* Allow for a build directory separate from the source.Alasdair Kergon2009-10-021-1/+2
|
* Consolidate LV allocation into alloc_lv().Alasdair Kergon2009-09-281-7/+1
|
* Add vg_is_resizeable() and cleanup references.Dave Wysochanski2009-09-151-1/+1
| | | | | | | Clean up VG_RESIZEABLE flag by creating vg_is_resizeable(). Update comment - we no longer have ALLOW_RESIZEABLE. Also use vg_is_exported() in one place missed by earlier patch. Should be no functional change.
* Use vg_is_exported(vg) macro everywhere.Dave Wysochanski2009-09-141-3/+3
| | | | | | | This patch is all just cleanup and no other patch depends on it. Replace explicit dereference and check with vg_is_exported(). Update a few copyrights and remove unnecessary whitespace. Should be no functional change.
* Add --dataalignmentoffset to pvcreate to shift start of aligned data areaMike Snitzer2009-07-301-0/+1
| | | | | | | | Adds pe_align_offset to 'struct physical_volume'; is initialized with set_pe_align_offset(). After pe_start is established pe_align_offset is added to it. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Add vg_reduce to metadata.c and metadata-exported.hDave Wysochanski2009-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This function behaves a little bit different than vg_reduce_single, because it allowes to remove even the latest pv. This has been done to be consistent to lvm_vg_create, which creates an empty vg. removed_pvs has been added to the volume_group struct. vg_reduce adds remove pvs to this list to be able to commit the changes for the pvs in lvm_vg_comm in liblvm2app. Initialize removed_pvs list in format-specific volume_group constructors. Ideally, we should have a base constructor here that initializes the general non-format specific members of struct volume_group. But until then, there are multiple places to initialize these members. Maybe a better patch would be a base constructor patch for struct volume_group. That is more work though. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Signed-off-by: Thomas Woerner <twoerner@redhat.com> Author: Dave Wysochanski <dwysocha@redhat.com>
* Use log_error macro consistently throughout in place of log_err.Alasdair Kergon2009-07-154-24/+24
|
* Merge lv_is_displayable and lv_is_visible.Milan Broz2009-05-131-1/+1
| | | | | | | Displayable and visible is the same thing. volumes_count(vg) is now vg_visible_lvs() and always returns number of LVs from user perspective.
* Introduce link_lv_to_vg and unlink_lv_from_vg functions.Milan Broz2009-05-131-10/+8
| | | | | | | link_lv_to_vg and unlink_lv_from_vg are the only functions for adding/removing logical volume from volume group. Only these function should manipulate with vg->lvs list.
* Tidy format1 import LV function.Milan Broz2009-05-132-6/+10
| | | | | | | | Later patch initializes lv->vg after the LV structure is prepared, so pass through cmd context and do not use vg->cmd here. Also move LV id calculation (which uses lv->vg too). Also properly free memory pool if operation fails.
* Remove vg->lv_count and use counter function.Milan Broz2009-05-131-2/+1
| | | | | | | This should not cause problems but simplifies code a lot. (the volumes_count is merged and renamed with lvs_visible function by following patch.)
* Fix snapshot segment import to not use duplicate segments & replace.Milan Broz2009-05-131-1/+1
| | | | | | | | | | | | | | | | | The snapshot segment (snapshotX) is created twice during the text metadata segment processing. This can cause temporary violation of max_lv count. Simplify the code, snapshot segment is properly initialized in init_snapshot_seg function now and do not need to be replaced by vg_add_snapshot call. The vg_add_snapshot() is now usefull only for adding new snapshot and it shares the same initialization function. The snapshot name is always generated, name paramater can be removed from function call.
* Remove snapshot_count from VG and use function instead.Milan Broz2009-05-121-1/+1
|
* Introduce memory pool per volume group.Milan Broz2009-04-101-7/+9
| | | | | | | | | | | | | | | | | | | | | Since now, all code reading volume group is responsible for releasing the memory allocated by calling vg_release(vg). (For simplicity of use, vg_releae can be called for vg == NULL, the same logic like free(NULL)). Also providing simple macro for unlocking & releasing in one step, tools usualy uses this approach. The global memory pool (cmd->mem) should be used only for global physical volume operations. This patch have to be applied with all subsequent patches to complete memory pool per vg logic. Using separate memory pool has quite bit memory saving impact when using large VGs, this is mainly needed when we have to use preallocated and locked memory (and should not overflow from that memory space).
* Try to avoid full rescan if label scan is enough.Milan Broz2009-02-251-1/+2
|
* Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)Alasdair Kergon2009-02-221-0/+1
| | | | | | | | | | | | | | | | | | This patch is not fully tested and leaves some related bugs unfixed. Intended behaviour of the code now: pe_start in the lvm2 format PV label header is set only by pvcreate (or vgconvert -M2) and then preserved in *all* operations thereafter. In some specialist cases, after the PV is added to a VG, the pe_start field in the VG metadata may hold a different value and if so, it overrides the other one for as long as the PV is in such a VG. Currently, the field storing the size of the data area in the PV label header always holds 0. As it only has meaning in the context of a volume group, it is calculated whenever the PV is added to a VG (and can be derived from extent_size and pe_count in the VG metadata).
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-038-108/+109
|
* Rename a couple of variables that matched function names.Alasdair Kergon2008-11-031-3/+3
|
* revert unexplained removal of a '<backtrace>' messageAlasdair Kergon2008-09-191-1/+1
|
* Improve the way VGs with PVs missing are handled so manual interventionAlasdair Kergon2008-09-193-20/+7
| | | | is required in fewer circumstances. (mornfall)
* Pass struct physical_volume to pe_align.Alasdair Kergon2008-09-191-0/+1
|
* revert unnecessary 'stack'sAlasdair Kergon2008-09-151-2/+2
|
* format1: Not detecing label on disc is not error, remove <backtrace> from ↵Milan Broz2008-08-281-3/+3
| | | | | | debug log (happens when you explicitly use -M 1)
* Fix metadata corruption writing lvm1-formatted metadata with snapshots.Alasdair Kergon2008-04-221-1/+1
|
* Add vg_is_clustered() helper function.Dave Wysochanski2008-04-101-1/+1
| | | | Should be no functional change.
* preparation for vg cacheAlasdair Kergon2008-03-171-1/+1
|
* split orphan VG by format typeAlasdair Kergon2008-02-065-14/+22
|
* Some whitespace tidy-ups.Alasdair Kergon2008-01-307-23/+23
|
* Use stack return macros throughout.Alasdair Kergon2008-01-307-222/+118
|
* Maintain lists of stacked LV segments using each LV.Alasdair Kergon2008-01-161-0/+1
|
* Enhance the management of readahead settings.Alasdair Kergon2007-11-092-3/+13
|
* Show 'not usable' space when PV is too large for device in pvdisplay.Alasdair Kergon2007-11-051-2/+2
| | | | Ignore and fix up any excessive device size found in metadata.
* Fix orphan-related locking in pvdisplay and pvs.Alasdair Kergon2007-11-022-6/+9
| | | | | | | | Fix missing VG unlocks in some pvchange error paths. Add some missing validation of VG names. Rename validate_vg_name() to validate_new_vg_name(). Change orphan lock to VG_ORPHANS. Change format1 to use ORPHAN as orphan VG name.
* Add is_orphan_vg() and change all hardcoded checks to use it.Bryn M. Reeves2007-11-021-1/+1
|
* Add pv_dev_name() to access PV device name.Dave Wysochanski2007-10-122-6/+6
| | | | Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
* Non-functional change - refactor vg_add_snapshot fid parameter.Dave Wysochanski2007-10-111-1/+1
|
* Correct typo in comments: s/is part of the LVM2/is part of LVM2/.Jim Meyering2007-09-211-1/+1
| | | | | | | Signed-off-by: Jim Meyering <jim@meyering.net> Author: Jim Meyering <jim@meyering.net>
* Clean up numerous compiler warnings that crept in recently.Alasdair Kergon2007-08-224-20/+20
| | | | Remove several unused parameters from _allocate().
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-2010-28/+28
|
* Add devices/preferred_names config regex list for displayed device names.Alasdair Kergon2007-04-263-44/+27
| | | | | | Free a temporary dir string in fcntl_lock_file() after use. Fix a dm_pool_destroy() in matcher_create(). Introduce goto_bad macro.
* Try to fix reading in of lvm1 striped LVs.Alasdair Kergon2007-03-151-33/+36
| | | | | | | There are two fixes other than improving variable names and updating code layout etc. The loop counter is incremented by area_len instead of area_len * stripes; the 3rd _check_stripe parameter is no longer multiplied by number of stripes.
* Adjust some alignments for ia64 and sparc.Alasdair Kergon2006-11-303-10/+10
| | | | (Some of the changes are probably unnecessary.)
* Set PV size to current device size if it is found to be zero.Alasdair Kergon2006-10-193-6/+28
|
* Move lvm_snprintf into libdevmapper.Alasdair Kergon2006-08-211-1/+1
|
* Separate out LVM1_PE_ALIGN.Alasdair Kergon2006-08-173-3/+4
|