]> sourceware.org Git - lvm2.git/log
lvm2.git
15 years agocleanup some ignored return values & 'stack's
Alasdair Kergon [Mon, 3 Aug 2009 11:20:15 +0000 (11:20 +0000)]
cleanup some ignored return values & 'stack's

15 years agodeal with error-related FIXMEs
Alasdair Kergon [Mon, 3 Aug 2009 11:01:26 +0000 (11:01 +0000)]
deal with error-related FIXMEs

15 years agolvchange --noudevsync
Alasdair Kergon [Mon, 3 Aug 2009 10:58:40 +0000 (10:58 +0000)]
lvchange --noudevsync

15 years agoMake lvconvert honour log mirror options combined with downconversion.
Petr Rockai [Sun, 2 Aug 2009 21:59:21 +0000 (21:59 +0000)]
Make lvconvert honour log mirror options combined with downconversion.
(RHBZ 463272)

15 years agoSlightly refactor mirror log conversions in lvconvert.
Petr Rockai [Sun, 2 Aug 2009 21:56:29 +0000 (21:56 +0000)]
Slightly refactor mirror log conversions in lvconvert.

15 years agoAdd test for RHBZ 481793 (passing, thanks to vg_read changes checked in
Petr Rockai [Sun, 2 Aug 2009 21:45:45 +0000 (21:45 +0000)]
Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
previously).

15 years agoAllow LV suspend while --ignorelockingfailure is in force.
Petr Rockai [Sun, 2 Aug 2009 21:03:09 +0000 (21:03 +0000)]
Allow LV suspend while --ignorelockingfailure is in force.

15 years agoUpdate synopsis in lvconvert manpage to mention --repair.
Petr Rockai [Sun, 2 Aug 2009 21:01:51 +0000 (21:01 +0000)]
Update synopsis in lvconvert manpage to mention --repair.

15 years agoFix error handling of device-related stat() calls to be ENOENT aware.
snitzer [Sat, 1 Aug 2009 17:14:52 +0000 (17:14 +0000)]
Fix error handling of device-related stat() calls to be ENOENT aware.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoRetrieve MD sysfs attributes for MD partitions
snitzer [Sat, 1 Aug 2009 17:11:02 +0000 (17:11 +0000)]
Retrieve MD sysfs attributes for MD partitions

Rename private _primary_dev() to a public get_primary_dev() and reuse it
to allow retrieval of the MD sysfs attributes (raid level, etc) for MD
partitions.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoImprove ability to lookup primary device associated with a partition
snitzer [Sat, 1 Aug 2009 17:09:48 +0000 (17:09 +0000)]
Improve ability to lookup primary device associated with a partition

Improve lib/device/device.c:_primary_dev()'s ability to look up the
primary device associated with all partitions; including blkext
(e.g. partitions directly on MD).  The same will also work for obscure
sysfs paths; e.g.: paths with mangled names like the HP cciss driver
uses: /sys/block/cciss!c0d0/cciss!c0d0p1/

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoAdd devices/data_alignment_detection to lvm.conf.
snitzer [Sat, 1 Aug 2009 17:08:43 +0000 (17:08 +0000)]
Add devices/data_alignment_detection to lvm.conf.

Adds 'data_alignment_detection' config option to the devices section of
lvm.conf.  If your kernel provides topology information in sysfs (linux
>= 2.6.31) for the Physical Volume, the start of data area will be
aligned on a multiple of the ’minimum_io_size’ or ’optimal_io_size’
exposed in sysfs.

minimum_io_size is used if optimal_io_size is undefined (0).  If both
md_chunk_alignment and data_alignment_detection are enabled the result
of data_alignment_detection is used.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoAdd devices/data_alignment_offset_detection to lvm.conf.
snitzer [Sat, 1 Aug 2009 17:07:36 +0000 (17:07 +0000)]
Add devices/data_alignment_offset_detection to lvm.conf.

If the pvcreate --dataalignmentoffset option is not specified the start
of a PV's aligned data area will be shifted by the associated
'alignment_offset' exposed in sysfs (unless
devices/data_alignment_offset_detection is disabled in lvm.conf).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agodummy makefile for now to keep builds happy
Alasdair Kergon [Fri, 31 Jul 2009 18:41:19 +0000 (18:41 +0000)]
dummy makefile for now to keep builds happy

15 years agoSet cookies in activation code and wait for udev to complete processing.
Alasdair Kergon [Fri, 31 Jul 2009 18:30:31 +0000 (18:30 +0000)]
Set cookies in activation code and wait for udev to complete processing.

15 years agoAdd udevcomplete and --noudevwait to dmsetup.
Alasdair Kergon [Fri, 31 Jul 2009 17:51:45 +0000 (17:51 +0000)]
Add udevcomplete and --noudevwait to dmsetup.

15 years agoanother fixme
Alasdair Kergon [Fri, 31 Jul 2009 16:57:06 +0000 (16:57 +0000)]
another fixme

15 years ago Add libdevmapper functions to support synchronisation with udev.
Alasdair Kergon [Fri, 31 Jul 2009 15:53:11 +0000 (15:53 +0000)]
  Add libdevmapper functions to support synchronisation with udev.

15 years agoFix compile warnings from recently added log_very_verbose() in _text_pv_write()
snitzer [Fri, 31 Jul 2009 14:23:06 +0000 (14:23 +0000)]
Fix compile warnings from recently added log_very_verbose() in _text_pv_write()

15 years agoconfigure --udevdir
Alasdair Kergon [Fri, 31 Jul 2009 13:31:53 +0000 (13:31 +0000)]
configure --udevdir

15 years agoadd not-yet-working udev options
Alasdair Kergon [Fri, 31 Jul 2009 11:51:23 +0000 (11:51 +0000)]
add not-yet-working udev options

15 years agoPrepare for udev synchronisation code. (options don't work yet)
Alasdair Kergon [Fri, 31 Jul 2009 11:49:53 +0000 (11:49 +0000)]
Prepare for udev synchronisation code.  (options don't work yet)

15 years agoDisable the "new pe_start policy"
snitzer [Thu, 30 Jul 2009 21:15:17 +0000 (21:15 +0000)]
Disable the "new pe_start policy"

Documented which use-cases force the reinstatement of the nuanced
handling of pe_start.  As soon as orphan PVs are eliminated much of this
will no longer be a concern ('preserve_pe_start' can be reenabled in
.pv_setup).

Added defensive 'if (pv->pe_align)' check in _text_pv_write()'s pe_start
loop.

15 years agoRevert 'preserve_pe_start' related code in _text_pv_setup
snitzer [Thu, 30 Jul 2009 18:40:22 +0000 (18:40 +0000)]
Revert 'preserve_pe_start' related code in _text_pv_setup

If pv_setup was given a non-zero pe_start it would short-circuit
establishing a default pv->pe_align.  pv->pe_align=0 would result
in a divide by zero in _mda_setup().  'vgconvert -M2 $vgname' hit this.

.pv_write still properly preserves pe_start if it was supplied.

15 years agoAdd --dataalignmentoffset to pvcreate to shift start of aligned data area
snitzer [Thu, 30 Jul 2009 17:45:28 +0000 (17:45 +0000)]
Add --dataalignmentoffset to pvcreate to shift start of aligned data area

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>
15 years agoPreserve pe_start in .pv_setup and .pv_write if pe_start was supplied.
snitzer [Thu, 30 Jul 2009 17:42:33 +0000 (17:42 +0000)]
Preserve pe_start in .pv_setup and .pv_write if pe_start was supplied.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoRemove legacy support for preserving pe_start if a PV already has data
snitzer [Thu, 30 Jul 2009 17:41:01 +0000 (17:41 +0000)]
Remove legacy support for preserving pe_start if a PV already has data
areas.

This preserved pe_start would quickly be readjusted to follow the first
mda anyway.  An example use-case that hit this code path is: running
pvcreate on an already existing PV _without_ a preceeding pvremove.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoFix _mda_setup() to not check first mda's size before pe_align rounding.
snitzer [Thu, 30 Jul 2009 17:19:31 +0000 (17:19 +0000)]
Fix _mda_setup() to not check first mda's size before pe_align rounding.

Without this fix rounding the end of the first mda to a pe_align
boundary could silently exceed the disk_size.

Final 'if (start1 + mda_size1 > disk_size)' block serves as a safety
net.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoFormalize pe_start policy as split between .pv_setup and .pv_write.
snitzer [Thu, 30 Jul 2009 17:18:03 +0000 (17:18 +0000)]
Formalize pe_start policy as split between .pv_setup and .pv_write.

Document existing pe_start policy.
Fix issue in _text_pv_setup() where existing pe_start case could have
the pv->pe_start set to pv->pe_align even though pe_start shouldn't ever
change.

vgconvert and pvcreate have a facility to preserve the existing start
of the on-disk data extents, known as pe_start.
They indicate this by passing the existing value to the pvsetup function
which must preserve it.

This patch avoids one particular case where the value could get
changed incorrectly now that the alignment settings are configurable.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoDocument the -I option to clvmd
Christine Caulfield [Thu, 30 Jul 2009 13:32:38 +0000 (13:32 +0000)]
Document the -I option to clvmd

15 years agocorosync not cman...
Alasdair Kergon [Thu, 30 Jul 2009 12:31:45 +0000 (12:31 +0000)]
corosync not cman...

15 years agoFix configure script to handle multiple clvmd selections.
Alasdair Kergon [Thu, 30 Jul 2009 12:25:42 +0000 (12:25 +0000)]
Fix configure script to handle multiple clvmd selections.

15 years ago Fix lvm2app.pc installation filename.
Alasdair Kergon [Wed, 29 Jul 2009 19:24:11 +0000 (19:24 +0000)]
  Fix lvm2app.pc installation filename.

15 years agoDon't include lvm-version.h in exported liblvm file!
Dave Wysochanski [Wed, 29 Jul 2009 18:38:27 +0000 (18:38 +0000)]
Don't include lvm-version.h in exported liblvm file!

Move include of lvm-version.h into lvm_base.c where it belongs.

15 years agoRemove unneeded struct on return from lvm_lv_create_linear.
Dave Wysochanski [Wed, 29 Jul 2009 16:47:53 +0000 (16:47 +0000)]
Remove unneeded struct on return from lvm_lv_create_linear.

Results in compile warning.

15 years agorenamed include files
Alasdair Kergon [Wed, 29 Jul 2009 14:06:31 +0000 (14:06 +0000)]
renamed include files

15 years agoRemove pv_t, vg_t & lv_t handles from lib. Only liblvm uses them.
Alasdair Kergon [Wed, 29 Jul 2009 13:26:01 +0000 (13:26 +0000)]
Remove pv_t, vg_t & lv_t handles from lib.  Only liblvm uses them.
Rename lvm.h to lvm2app.h for now.

15 years agoRemove old custom list macros and replace with libdevmapper list
Jonathan Earl Brassow [Tue, 28 Jul 2009 21:14:12 +0000 (21:14 +0000)]
Remove old custom list macros and replace with libdevmapper list
macros.

15 years agopost-release
Alasdair Kergon [Tue, 28 Jul 2009 20:47:40 +0000 (20:47 +0000)]
post-release

15 years ago\n old-v2_02_50 v2_02_50
Alasdair Kergon [Tue, 28 Jul 2009 20:41:41 +0000 (20:41 +0000)]
\n

15 years agoclean up a bit for release
Alasdair Kergon [Tue, 28 Jul 2009 19:32:26 +0000 (19:32 +0000)]
clean up a bit for release

15 years agopre-release
Alasdair Kergon [Tue, 28 Jul 2009 17:22:07 +0000 (17:22 +0000)]
pre-release

15 years agopre-release
Alasdair Kergon [Tue, 28 Jul 2009 17:07:48 +0000 (17:07 +0000)]
pre-release

15 years agoMaking adjustments to go along with the changes to the kernel.
Jonathan Earl Brassow [Tue, 28 Jul 2009 15:55:50 +0000 (15:55 +0000)]
Making adjustments to go along with the changes to the kernel.
A patch to the kernel, adding the 'luid' field to dm_ulog_request,
will allow us to properly identify log instances.  We will now
be able to definitively identify which logs are to be removed/
suspended/resumed.  This replaces the old faulty behavior of
assuming the logs were the same if they had the same UUID and
incrementing/decrementing a reference count.

15 years agoAdd doxygen mainpage tag to lvm.h
Dave Wysochanski [Tue, 28 Jul 2009 15:33:59 +0000 (15:33 +0000)]
Add doxygen mainpage tag to lvm.h

15 years agoAdd an open_mode to the vg struct for liblvm - enforce read / write semantics.
Dave Wysochanski [Tue, 28 Jul 2009 15:14:56 +0000 (15:14 +0000)]
Add an open_mode to the vg struct for liblvm - enforce read / write semantics.

For now, a simple way to enforce the read/write semantics is to just save the
open mode of the VG.  If the caller uses lvm_vg_create, the mode is write.
The caller using lvm_vg_open can use either read or write to open the VG.
Once we have this, we enforce the permissions on each API call and don't allow
a caller to modify a VG that has not been opened properly.

This may be better combined with the locking mode, but I view that as future
cleanup, past this initial release.  The intial release should enforce the
basic object semantics though, as described in the lvm.h file.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate interactive unit test - fix silly vg_close error.
Dave Wysochanski [Tue, 28 Jul 2009 14:12:29 +0000 (14:12 +0000)]
Update interactive unit test - fix silly vg_close error.

15 years agoUpdate interactive unit test for liblvm - add vg_write, general cleanup.
Dave Wysochanski [Tue, 28 Jul 2009 13:49:28 +0000 (13:49 +0000)]
Update interactive unit test for liblvm - add vg_write, general cleanup.

15 years agoAdd lvm_vg_get_seqno, updating lvm.h and unit test.
Dave Wysochanski [Tue, 28 Jul 2009 13:17:04 +0000 (13:17 +0000)]
Add lvm_vg_get_seqno, updating lvm.h and unit test.

Adding the ability to get the seqno is important for an application to
determine if something has changed in a VG.  Otherwise, the only way to
know is to open the VG with write permission and hold the handle.

15 years agoUpdate lvm.h - remove remaining FIXMEs, note limitations of a few functions.
Dave Wysochanski [Tue, 28 Jul 2009 13:16:40 +0000 (13:16 +0000)]
Update lvm.h - remove remaining FIXMEs, note limitations of a few functions.

Almost done...

15 years agoFix lvm.h formatting.
Dave Wysochanski [Tue, 28 Jul 2009 12:19:58 +0000 (12:19 +0000)]
Fix lvm.h formatting.

15 years agoAdd lvm_library_get_version() and update unit tests to display version.
Dave Wysochanski [Tue, 28 Jul 2009 11:03:28 +0000 (11:03 +0000)]
Add lvm_library_get_version() and update unit tests to display version.

15 years agoUse dm_malloc and dm_free in liblvm instead of malloc/free.
Dave Wysochanski [Tue, 28 Jul 2009 09:56:48 +0000 (09:56 +0000)]
Use dm_malloc and dm_free in liblvm instead of malloc/free.

15 years agoRename lvm_create to lvm_init and lvm_destroy to lvm_quit.
Dave Wysochanski [Tue, 28 Jul 2009 09:16:18 +0000 (09:16 +0000)]
Rename lvm_create to lvm_init and lvm_destroy to lvm_quit.

15 years agoUpdate lvm.h to address feeback.
Dave Wysochanski [Tue, 28 Jul 2009 00:36:58 +0000 (00:36 +0000)]
Update lvm.h to address feeback.

This addresses a a large amount of Alasdair's review.  Subsequent patches
will address remaining issues.
Addressed:
// FIXME Mention that's also required on error.
// FIXME Be consistent in terminology.  It's called "system_dir" then last sentence says "system directory setting".  Is it referring to "system_dir" there or something else?
// FIXME Mention it frees all resources and cannot be used subsequently?
// FIXME What does "any system configuration" mean?
// FIXME Expand on that explanation a bit, now that we know what the other fns look like.
// FIXME Not sure about that - it needs to scan sometimes.  "will not" or "might not" ?
// FIXME: That's a FIXME in the code!!!
// FIXME What does "copied" mean in this context???
// FIXME Say what struct the returned struct dm_list is a list of...
// FIXME "This API" ?  This function creates an object in memory?
// FIXME This function commits the Volume Group object referenced by the VG handle to disk?
// FIXME Where is "Name" defined?  Absolute pathname?

Outstanding:
// FIXME Version function first?  No structs or handles needed for that.
// FIXME Sort out this alignment.  "Set an" directly below "system_dir" looks awful.  Indent differently?  More blank lines?
// FIXME Check how doxygen processes this.  E.g. "return: LVM handle.  You must use lvm_error() to check there were no errors and confirm that the handle is valid for passing to other functions."
// FIXME Find a better name.  lvm_init.
// FIXME Consider renaming according to the new name for lvm_create.
// FIXME Please can we use dm_malloc throughout?

15 years agoAdd warning to lvm.h stating API development in progress.
Dave Wysochanski [Mon, 27 Jul 2009 21:13:54 +0000 (21:13 +0000)]
Add warning to lvm.h stating API development in progress.

15 years agoUpdate WHATS_NEW for latest liblvm changes
Dave Wysochanski [Mon, 27 Jul 2009 21:10:30 +0000 (21:10 +0000)]
Update WHATS_NEW for latest liblvm changes

15 years agoRemove unnecessary \n's from log_error in liblvm.
Dave Wysochanski [Mon, 27 Jul 2009 21:03:15 +0000 (21:03 +0000)]
Remove unnecessary \n's from log_error in liblvm.

15 years agoAdd config_reload and config_override to test.c, change prompt.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:51 +0000 (21:02 +0000)]
Add config_reload and config_override to test.c, change prompt.

  PV         PV UUID                                VG
  /dev/loop1 A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn vg1
  /dev/loop0 R16FDG-OmoS-HNGt-LSZY-OAlC-7qeU-t2gztp vg1
lvm> config_override loop0
Success overriding LVM configuration
lvm> config_reload
Success reloading LVM configuration
lvm> vg_open vg1
Couldn't find device with uuid 'A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn'.
Success opening vg vg1
lvm> vg_close vg1
lvm> quit

Maybe a bug in lvm_vg_open for missing pvs but the filter seems to work.

Change prompt from "lvm>" to "liblvm>".

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate return code for lvm_config_reload.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:35 +0000 (21:02 +0000)]
Update return code for lvm_config_reload.

15 years agoAdd lvm_config_override - allow caller to override config, similar to --config.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:17 +0000 (21:02 +0000)]
Add lvm_config_override - allow caller to override config, similar to --config.

Allowing the caller to override the LVM configuration with an API will
enable them to use things such as device filters.
While very flexible, there is some danger to this API in that it will
make it harder to debug setups that have a changing config and deduce
what might have happened.  At some point we may want to limit the scope
of this API but for now it is as open as the --config option to lvm commands.

Update exported symbols.  When I renamed lvm_reload_config to lvm_config_reload
I forgot to rename so I renamed that one here.

This I believe is the last liblvm API for now.  ;-)

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoRename _override_settings into override_config_tree_from_string and move.
Dave Wysochanski [Mon, 27 Jul 2009 21:01:56 +0000 (21:01 +0000)]
Rename _override_settings into override_config_tree_from_string and move.

Move _override_settings from tools/lvmcmdline.c into lib/config/config.c
and export so we can re-use in liblvm.

15 years agoRefactor _override_settings to take the new config string as input.
Dave Wysochanski [Mon, 27 Jul 2009 21:01:36 +0000 (21:01 +0000)]
Refactor _override_settings to take the new config string as input.

We will re-use this function from liblvm.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoAdd skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.
Dave Wysochanski [Mon, 27 Jul 2009 21:00:50 +0000 (21:00 +0000)]
Add skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.

These lower-priority interfaces are not currently implemented in liblvm
but are on the TODO list in the near term.

Author: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.
Dave Wysochanski [Mon, 27 Jul 2009 17:45:21 +0000 (17:45 +0000)]
Update test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/vgtest.c to include lvm_vg_reduce.
Dave Wysochanski [Mon, 27 Jul 2009 17:44:58 +0000 (17:44 +0000)]
Update test/api/vgtest.c to include lvm_vg_reduce.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd lvm_vg_reduce to liblvm2app
Dave Wysochanski [Mon, 27 Jul 2009 17:44:29 +0000 (17:44 +0000)]
Add lvm_vg_reduce to liblvm2app

Extend lvm_vg_write to remove pvs removed in lvm_vg_reduce. The lvm
volume_group internal structure removed_pvs is used for that. The list is
empty afterwards.

Add new test for vg->pvs emptyness to lvm_vg_write to prevent to write empty
vgs. This is needed because of lvm_vg_reduce and lv_vg_create, which creates
empty vgs.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd vg_reduce to metadata.c and metadata-exported.h
Dave Wysochanski [Mon, 27 Jul 2009 17:43:39 +0000 (17:43 +0000)]
Add vg_reduce to metadata.c and metadata-exported.h

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>

15 years agoUpdate error return and comments for lvm_list_vg_names/uuids.
Dave Wysochanski [Mon, 27 Jul 2009 11:00:17 +0000 (11:00 +0000)]
Update error return and comments for lvm_list_vg_names/uuids.

The two liblvm functions that return a list of vgnames and vguuids use
cmd->mem to allocate the list.  Make it clear to the caller that this
memory will be freed when the LVM handle is freed.

Clean up and clarify the return value of the functions.  In the
case of a memory allocation error, add a couple log_errnos to the internal
code, and make it clear that memory allocation returns a NULL pointer.
If there are no VGs in the system, the list returned is an empty list.

Make a note of the fact that currently we return hidden VG names, how
these can be detected (always start with "#"), and that they should
not be used.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_reload_config to lvm_config_reload.
Dave Wysochanski [Mon, 27 Jul 2009 10:18:51 +0000 (10:18 +0000)]
Rename lvm_reload_config to lvm_config_reload.

The general naming scheme for most liblvm APIs is:
lvm_<object>_<action>

As there are likely to be other things to do on the lvm 'config' object
(i.e. lvm_config_set_device_filter), we should use consistent naming.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate display.c to use vg_free(vg) instead of duplicating the calculation.
Dave Wysochanski [Mon, 27 Jul 2009 10:18:31 +0000 (10:18 +0000)]
Update display.c to use vg_free(vg) instead of duplicating the calculation.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoMore liblvm header file cleanups.
Dave Wysochanski [Mon, 27 Jul 2009 08:28:13 +0000 (08:28 +0000)]
More liblvm header file cleanups.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate WHATS_NEW for latest liblvm changes
Dave Wysochanski [Sun, 26 Jul 2009 22:19:14 +0000 (22:19 +0000)]
Update WHATS_NEW for latest liblvm changes

15 years agoUpdate test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.
Dave Wysochanski [Sun, 26 Jul 2009 20:59:02 +0000 (20:59 +0000)]
Update test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/test.c to call lv_deactivate and lv_activate.
Dave Wysochanski [Sun, 26 Jul 2009 20:58:38 +0000 (20:58 +0000)]
Update test/api/test.c to call lv_deactivate and lv_activate.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd lvm_lv_is_active and lvm_lv_is_suspended.
Dave Wysochanski [Sun, 26 Jul 2009 20:58:11 +0000 (20:58 +0000)]
Add lvm_lv_is_active and lvm_lv_is_suspended.

Return whether an LV is active in the kernel (live table) or suspended
(table suspend).

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoImplement lvm_lv_activate and lvm_lv_deactivate liblvm calls.
Dave Wysochanski [Sun, 26 Jul 2009 20:57:37 +0000 (20:57 +0000)]
Implement lvm_lv_activate and lvm_lv_deactivate liblvm calls.

Limited implementation but other types of activation should probably have
separate calls.  We also currently do not handle pvmoves or lvconverts.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/*.c to use consistent liblvm error returns.
Dave Wysochanski [Sun, 26 Jul 2009 20:29:56 +0000 (20:29 +0000)]
Update test/api/*.c to use consistent liblvm error returns.

For now, liblvm will return -1 (fail) / 0 (success) or
NULL (fail) / non-NULL (success).  Upon failure, lvm_errno and
lvm_errmsg should be used to determine the precise error.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate a few liblvm calls with log_errno.
Dave Wysochanski [Sun, 26 Jul 2009 20:29:28 +0000 (20:29 +0000)]
Update a few liblvm calls with log_errno.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate liblvm status return codes to be consistent.
Dave Wysochanski [Sun, 26 Jul 2009 20:28:59 +0000 (20:28 +0000)]
Update liblvm status return codes to be consistent.

For now, we use the following scheme.
For APIs that return an int, success is 0, fail is -1.
APIs that return handles, success is non-NULL, fail is NULL.
At this early stage, liblvm error handling mechanism is subject to change,
but for now we go with this simple scheme consistent with system
programming.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoA few more lvm.h updates that got missed.
Dave Wysochanski [Sun, 26 Jul 2009 16:49:52 +0000 (16:49 +0000)]
A few more lvm.h updates that got missed.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_scan_vgs to lvm_scan.
Dave Wysochanski [Sun, 26 Jul 2009 16:44:05 +0000 (16:44 +0000)]
Rename lvm_scan_vgs to lvm_scan.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate lvm.h - comments describing function behavior, divide into sections.
Dave Wysochanski [Sun, 26 Jul 2009 16:35:57 +0000 (16:35 +0000)]
Update lvm.h - comments describing function behavior, divide into sections.

Hard to divide into smaller patches because of the moving around and
commenting, so just put in the new file diffs.  We will review and can
update as necessary.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate lvm.h handle and handle list comments.
Dave Wysochanski [Sun, 26 Jul 2009 16:11:58 +0000 (16:11 +0000)]
Update lvm.h handle and handle list comments.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_vg_get_free to lvm_vg_get_free_size.
Dave Wysochanski [Sun, 26 Jul 2009 16:06:46 +0000 (16:06 +0000)]
Rename lvm_vg_get_free to lvm_vg_get_free_size.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_list_vg_ids to lvm_list_vg_uuids.
Dave Wysochanski [Sun, 26 Jul 2009 16:06:21 +0000 (16:06 +0000)]
Rename lvm_list_vg_ids to lvm_list_vg_uuids.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_vg_get_free_count to lvm_vg_get_free_extent_count.
Dave Wysochanski [Sun, 26 Jul 2009 16:05:49 +0000 (16:05 +0000)]
Rename lvm_vg_get_free_count to lvm_vg_get_free_extent_count.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/test.c to call lvm_lv_remove.
Dave Wysochanski [Sun, 26 Jul 2009 14:37:15 +0000 (14:37 +0000)]
Update test/api/test.c to call lvm_lv_remove.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd lvm_vg_remove_lv liblvm function.
Dave Wysochanski [Sun, 26 Jul 2009 14:36:52 +0000 (14:36 +0000)]
Add lvm_vg_remove_lv liblvm function.

Add a very simple version of lvm_vg_remove_lv.
Since we currently can only create linear LVs, this simple remove function
is adequate.  We must refactor lvremove_single a bit.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/test.c - correct list_vg_names and list_vg_ids.
Dave Wysochanski [Sun, 26 Jul 2009 13:08:00 +0000 (13:08 +0000)]
Update test/api/test.c - correct list_vg_names and list_vg_ids.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/test.c for liblvm 'get' functions.
Dave Wysochanski [Sun, 26 Jul 2009 13:07:41 +0000 (13:07 +0000)]
Update test/api/test.c for liblvm 'get' functions.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd most all liblvm 'get' functions needed for anaconda.
Dave Wysochanski [Sun, 26 Jul 2009 13:06:59 +0000 (13:06 +0000)]
Add most all liblvm 'get' functions needed for anaconda.

Add the most straightforward 'get' functions required for anaconda.
These are the ones that return simple uint64_t values.
The other more complex ones involve the lv_attr bits.  These will
come in a separate patch series since each lv_attr bit will be returned
in a separate API instred of returning the string and requiring the
user to parse it.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUse vg_size in vg_set_extent_size.
Dave Wysochanski [Sun, 26 Jul 2009 12:41:36 +0000 (12:41 +0000)]
Use vg_size in vg_set_extent_size.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRefactor a few report field calculations into separate functions.
Dave Wysochanski [Sun, 26 Jul 2009 12:41:09 +0000 (12:41 +0000)]
Refactor a few report field calculations into separate functions.

For liblvm 'get' functions, we should share code with the reporting functions.
This means we need common code to return the values for the fields.
In this patch we refactor a few of the fields needed in liblvm.
Unfortunately, for the simple fields that do derefernces of structure
members (for example, vg_extent_count), we cannot call the common function
from the reporting infrastructure without more refactoring.  The reason is
that the dereference of the simple fields is done deep inside the reporting
code (to get the generic "data" pointer), and the display function is a
generic 'size32' function.  We can fix these issues later with more
refactoring.

Should be no functional change and the testsuite should cover any possible
regressions.  The only fields in the report affected by this patch are:
vg_size, vg_free, and pv_mda_count.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename vg_size to vgsize to avoid naming conflicts.
Dave Wysochanski [Sun, 26 Jul 2009 12:40:27 +0000 (12:40 +0000)]
Rename vg_size to vgsize to avoid naming conflicts.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate WHATS_NEW for recent checkins
Dave Wysochanski [Sun, 26 Jul 2009 11:21:32 +0000 (11:21 +0000)]
Update WHATS_NEW for recent checkins

15 years agoUpdate test/api/test.c to call lvm_vg_create_lv_linear.
Dave Wysochanski [Sun, 26 Jul 2009 02:35:47 +0000 (02:35 +0000)]
Update test/api/test.c to call lvm_vg_create_lv_linear.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/test.c to handle read/write open modes.
Dave Wysochanski [Sun, 26 Jul 2009 02:35:19 +0000 (02:35 +0000)]
Update test/api/test.c to handle read/write open modes.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd lvm_vg_create_lv_linear liblvm function.
Dave Wysochanski [Sun, 26 Jul 2009 02:34:36 +0000 (02:34 +0000)]
Add lvm_vg_create_lv_linear liblvm function.

Create a default linear logical volume from a volume group.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoMove extents_from_size from lvcreate into internal library so we can reuse.
Dave Wysochanski [Sun, 26 Jul 2009 02:34:09 +0000 (02:34 +0000)]
Move extents_from_size from lvcreate into internal library so we can reuse.

Author: Dave Wysochanski <dwysocha@redhat.com>

This page took 0.065671 seconds and 5 git commands to generate.