]> sourceware.org Git - lvm2.git/log
lvm2.git
11 years agopvcreate: Avoid spurious 'not found' messages.
Alasdair G Kergon [Fri, 29 Nov 2013 21:45:37 +0000 (21:45 +0000)]
pvcreate: Avoid spurious 'not found' messages.

Replacement of pv_read by find_pv_by_name in commit
651d5093edde3e0ebee9d75be1c9834efc152d91 caused spurious
error messages when running pvcreate or vgextend against an
unformatted device.

Physical volume /dev/loop4 not found
Physical volume "/dev/loop4" successfully created

Physical volume /dev/loop4 not found
Physical volume /dev/loop4 not found
Physical volume "/dev/loop4" successfully created
Volume group "vg1" successfully extended

11 years agolvmetad: extend socket/pid file handling
Alasdair G Kergon [Fri, 29 Nov 2013 20:56:29 +0000 (20:56 +0000)]
lvmetad: extend socket/pid file handling

Make it easier to run a live lvmetad in debugging mode and
to avoid conflicts if multiple test instances need to be run
alongside a live one.

No longer require -s when -f is used: use built-in default.
Add -p to lvmetad to specify the pid file.
No longer disable pidfile if -f used to run in foreground.
If specified socket file appears to be genuine but stale, remove it
before use.
On error, only remove lvmetad socket file if created by the same
process.  (Previous code removes socket even while a running instance
is using it!)

11 years agoconfigure: require libblkid >= 2.24 for blkid wiping
Peter Rajnoha [Fri, 29 Nov 2013 15:37:09 +0000 (16:37 +0100)]
configure: require libblkid >= 2.24 for blkid wiping

Some symbols/identifiers were defined even later than 2.22, like BLKID_SUBLKS_BADCSUM.

11 years agoconfigure: enable blkid_wiping by default if the blkid library is present
Peter Rajnoha [Fri, 29 Nov 2013 14:27:56 +0000 (15:27 +0100)]
configure: enable blkid_wiping by default if the blkid library is present

11 years agolvmetad: Add newline to missing socket error mesg
Alasdair G Kergon [Thu, 28 Nov 2013 19:16:25 +0000 (19:16 +0000)]
lvmetad: Add newline to missing socket error mesg

11 years agotests: add test for lvcreate signature wiping
Peter Rajnoha [Thu, 28 Nov 2013 14:47:20 +0000 (15:47 +0100)]
tests: add test for lvcreate signature wiping

11 years agotests: wipe fs signature manually in pvcreate-operation test
Peter Rajnoha [Thu, 28 Nov 2013 13:10:55 +0000 (14:10 +0100)]
tests: wipe fs signature manually in pvcreate-operation test

So that the next pvcreate that is called does not issue any
warnings/prompts about existing signature (when blkid wiping is used).

11 years agotests: initialize signature wiping
Peter Rajnoha [Thu, 28 Nov 2013 12:23:45 +0000 (13:23 +0100)]
tests: initialize signature wiping

Do not use signature wiping for newly created LVs in tests - we're
reusing the devs in tests and such detection could just interfere
inappropriately. We'd need to modify all tests to anwer the prompt
whether any signature found should be removed or not or we'd need
to use "-y" option for all lvcreates in tests. It's better to disable
this feature then and let's do a separate test to test this signature
wiping functionality.

11 years agopvcreate: do not issue warning about any existing PV
Peter Rajnoha [Thu, 28 Nov 2013 12:14:46 +0000 (13:14 +0100)]
pvcreate: do not issue warning about any existing PV

If we're calling pvcreate on a device that already has a PV label,
the blkid detects the existing PV and then we consider it for wiping
before we continue creating the new PV label and we issue a warning
with a prompt whether such old PV label should be removed. We don't
do this with native signature detection code. Let's make it consistent
with old behaviour.

But still keep this "PV" (identified as "LVM1_member" or "LVM2_member"
by blkid) detection when creating new LVs to avoid unexpected PV label
appeareance inside LV.

11 years agocleanup: tab indent
Zdenek Kabelac [Thu, 28 Nov 2013 10:35:53 +0000 (11:35 +0100)]
cleanup: tab indent

11 years agocleanup: convert log_error with log_warn
Zdenek Kabelac [Mon, 25 Nov 2013 13:34:34 +0000 (14:34 +0100)]
cleanup: convert log_error with log_warn

Collapse 2 ifs and replace log_error() with log_warn(), since\
the reported message is not causing tools error.
(and cannot be probably triggered anyway).

11 years agocleanup: convert log_sys_error to log_sys_debug
Zdenek Kabelac [Mon, 25 Nov 2013 12:46:34 +0000 (13:46 +0100)]
cleanup: convert log_sys_error to log_sys_debug

Use debug for those error reports which do not lead to error return
call.

11 years agocleanup: move declaration to the front
Zdenek Kabelac [Mon, 25 Nov 2013 12:43:25 +0000 (13:43 +0100)]
cleanup: move declaration to the front

11 years agocleanup: use matching signed types
Zdenek Kabelac [Mon, 25 Nov 2013 12:42:30 +0000 (13:42 +0100)]
cleanup: use matching signed types

11 years agocleanup: drop extra dm_list_empty
Zdenek Kabelac [Sun, 24 Nov 2013 18:03:29 +0000 (19:03 +0100)]
cleanup: drop extra dm_list_empty

Since dm_list_first has this check already include,
skip extra call in while().
Moreover analyzers are then sure pvl is not NULL.

11 years agocleanup: fold test into printf arg
Zdenek Kabelac [Sun, 24 Nov 2013 17:59:46 +0000 (18:59 +0100)]
cleanup: fold test into printf arg

When arg is folded, compiler is able to check all args.
(better for security)

11 years agocleanup: use compound literals for wipe_lv
Zdenek Kabelac [Thu, 28 Nov 2013 10:22:24 +0000 (11:22 +0100)]
cleanup: use compound literals for wipe_lv

Optimize and cleanup recently introduced new function wipe_lv.
Use compound literals to get nicely initialized wipe_params struct.
Pass in lv as explicit argument for wipe_lv.
Use cmd from lv structure.
Initialize only non-null members so it's easy to see what
is the special arg.

11 years agotoollib: drop init of ret
Zdenek Kabelac [Fri, 22 Nov 2013 21:27:32 +0000 (22:27 +0100)]
toollib: drop init of ret

Keep the ret uninitialized, so we get compiler warning, when tried
to use this value instead of ret_max as function return value.

11 years agosnapshot: move code of old snapshot merge
Zdenek Kabelac [Tue, 26 Nov 2013 11:09:41 +0000 (12:09 +0100)]
snapshot: move code of old snapshot merge

Move code for merging old snapshot into its own function.

11 years agodmeventd: simplify error path
Zdenek Kabelac [Mon, 25 Nov 2013 13:24:25 +0000 (14:24 +0100)]
dmeventd: simplify error path

Use common 'bad:' label for exit error path where
fifo is closed before exit().

11 years agodmeventd: fifo init and close cleanup
Zdenek Kabelac [Thu, 28 Nov 2013 11:21:06 +0000 (12:21 +0100)]
dmeventd: fifo init and close cleanup

Use structure initialization for easier to read code.
Close only descriptors >= 0.

11 years agoconfig: use int for type
Zdenek Kabelac [Mon, 25 Nov 2013 12:44:46 +0000 (13:44 +0100)]
config: use int for type

Since the type is used for 'or' operation of enumerated bit fields,
it doesn't not have type cfg_def_type_t - use proper int type for
bitmask.

11 years agosnapshot: drop find_merging_snapshot
Zdenek Kabelac [Thu, 28 Nov 2013 10:39:38 +0000 (11:39 +0100)]
snapshot: drop find_merging_snapshot

Drop find_merging_snapshot() function. Use find_snapshot()
called after check for lv_is_merging_origin() which
is the commonly used code path - so we avoid duplicated
tests and potential risk of derefering NULL point
in unhandled error path.

11 years agoformat-text: ensure aligment is not 0
Zdenek Kabelac [Sun, 24 Nov 2013 18:00:53 +0000 (19:00 +0100)]
format-text: ensure aligment is not 0

Make sure this path of code is not used for alignment == 0,
to prevent division by 0.

11 years agoprofile: wipe_signatures_on_new_logical_volumes_when_zeroing not yet profilable
Peter Rajnoha [Wed, 27 Nov 2013 15:49:12 +0000 (16:49 +0100)]
profile: wipe_signatures_on_new_logical_volumes_when_zeroing not yet profilable

But it might be - needs more testing...

11 years agoman: lvcreate -W/--wipesignatures
Peter Rajnoha [Wed, 27 Nov 2013 14:20:12 +0000 (15:20 +0100)]
man: lvcreate -W/--wipesignatures

11 years agowiping: add support for blkid wiping
Peter Rajnoha [Fri, 15 Nov 2013 13:50:02 +0000 (14:50 +0100)]
wiping: add support for blkid wiping

This is actually the wipefs functionailty as a matter of fact
(wipefs uses the same libblkid calls).

libblkid is more rich when it comes to detecting various
signatures, including filesystems and users can better
decide what to erase and what should be kept.

The code is shared for both pvcreate (where wiping is necessary
to complete the pvcreate operation) and lvcreate where it's up
to the user to decide.

The verbose output contains a bit more information about the
signature like LABEL and UUID.

For example:
  raw/~ # lvcreate -L16m vg
  WARNING: linux_raid_member signature detected on /dev/vg/lvol0 at offset 4096. Wipe it? [y/n]

or more verbose one:
  raw/~ # lvcreate -L16m vg -v
  ...
     Found existing signature on /dev/vg/lvol0 at offset 4096: LABEL="raw.virt:0" UUID="da6af139-8403-5d06-b8c4-13f6f24b73b1" TYPE="linux_raid_member" USAGE="raid"
WARNING: linux_raid_member signature detected on /dev/vg/lvol0 at offset 4096. Wipe it? [y/n]

The verbose output is the same output as found in blkid.

11 years agoconf: add allocation/use_blkid_wiping
Peter Rajnoha [Wed, 27 Nov 2013 12:52:15 +0000 (13:52 +0100)]
conf: add allocation/use_blkid_wiping

Add allocation/use_blkid_wiping setting to lvm.conf to select between
LVM2 native code to detect signatures to wipe or blkid library code.

11 years agoconfigure: add --enable-blkid_wiping
Peter Rajnoha [Thu, 14 Nov 2013 13:03:24 +0000 (14:03 +0100)]
configure: add --enable-blkid_wiping

11 years agolv_manip: rename set_lv -> wipe_lv and include signature wiping capability
Peter Rajnoha [Wed, 6 Nov 2013 15:16:34 +0000 (16:16 +0100)]
lv_manip: rename set_lv -> wipe_lv and include signature wiping capability

Use common wipe_lv (former set_lv) fn to do zeroing as well as signature
wiping if needed. Provide new struct wipe_lv_params to define the
functionality.

Bind "lvcreate -W/--wipesignatures y" with proper wipe_lv call.

Also, add "yes" and "force" to lvcreate_params so it's possible
to apply them for the prompt: "WARNING: %s detected on %s. Wipe it? [y/n]".

11 years agolvcreate: recognize --wipesignatures arg
Peter Rajnoha [Wed, 6 Nov 2013 15:05:50 +0000 (16:05 +0100)]
lvcreate: recognize --wipesignatures arg

Recognize the new --wipesignatures arg in lvcreate that is supposed
to wipe known signatures if found on newly created LV.

11 years agoconf: add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing
Peter Rajnoha [Wed, 27 Nov 2013 11:54:48 +0000 (12:54 +0100)]
conf: add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing

This setting controls whether signature wiping on newly created logical
volumes will follow the state of zeroing (-Z/--zero option).

11 years agodevice: cleanup signature wiping functions
Peter Rajnoha [Wed, 6 Nov 2013 14:09:29 +0000 (15:09 +0100)]
device: cleanup signature wiping functions

The wipe_known_signatures fn now wraps the _wipe_signature fn that is called
for each known signature (currently md, swap and luks). This patch makes the
code more readable, not repeating the same sequence when used anywhere in the
code. We're going to reuse this code later...

11 years agoactivation: change log_error to log_warn if refresh before autoactivation fails
Peter Rajnoha [Wed, 27 Nov 2013 07:53:26 +0000 (08:53 +0100)]
activation: change log_error to log_warn if refresh before autoactivation fails

11 years agoWHATS_NEW: commit 729b104
Peter Rajnoha [Wed, 27 Nov 2013 07:33:02 +0000 (08:33 +0100)]
WHATS_NEW: commit 729b104

11 years agoactivation: continue with autoactivation if refresh fails
Peter Rajnoha [Wed, 27 Nov 2013 07:20:02 +0000 (08:20 +0100)]
activation: continue with autoactivation if refresh fails

If the refresh fails for any reason before autoactivation, let's not
make this a stopper for autoactivation itself - just log the error
message if it appears.

The reason is that in some rare situations, we can still hit the
problem with the suspend call to fail (as already described in
commit d8085edf65006a50608edb821b3d30947abaa838, also
https://bugzilla.redhat.com/show_bug.cgi?id=1027314). The refresh
itself is done for only one reason - to refresh any dm tables
for LVs for which the underlying PVs got unplugged/disconnected
and then plugged/connected back (see also
https://bugzilla.redhat.com/show_bug.cgi?id=954061 for more info).
In this case, the major:minor pair is changed and we need to
update dm tables for LVs accordingly.

Now if refresh fails, the error is still logged, but autoactivation
continues.

11 years agolv/vgchange: do not try to connect to lvmetad if socket absent and --sysinit -aay...
Peter Rajnoha [Tue, 26 Nov 2013 13:51:23 +0000 (14:51 +0100)]
lv/vgchange: do not try to connect to lvmetad if socket absent and --sysinit -aay used

If using lv/vgchange --sysinit -aay and lvmetad is enabled, we'd like to
avoid the direct activation and rely on autoactivation instead so
it fits system initialization scripts.

But if we're calling lv/vgchange --sysinit -aay too early when even
lvmetad service is not started yet, we just need to do the direct
activation instead without printing any error messages (while
trying to connect to lvmetad and not finding its socket).

This patch adds two helper functions - "lvmetad_socket_present" and
"lvmetad_used" which can be used to check for this condition properly
and avoid these lvmetad connections when the socket is not present
(and hence lvmetad is not yet running).

11 years agotests: add WARNED test to final list
Zdenek Kabelac [Thu, 21 Nov 2013 09:41:08 +0000 (10:41 +0100)]
tests: add WARNED test to final list

WARNED result should not be forgotten - it's supposed
to be fixed...

keep enum alphabetically sorted

11 years agocleanup: use const format
Zdenek Kabelac [Fri, 22 Nov 2013 19:43:30 +0000 (20:43 +0100)]
cleanup: use const format

11 years agocleanup: make gcc happier with initializers
Zdenek Kabelac [Fri, 22 Nov 2013 19:42:03 +0000 (20:42 +0100)]
cleanup: make gcc happier with initializers

Whole struct will be set to 0, just
if the first member is array, gcc gives warning
we should initialized this element as array,
so pick any later simple type.

11 years agocleanup: drop unused header
Zdenek Kabelac [Fri, 22 Nov 2013 09:04:13 +0000 (10:04 +0100)]
cleanup: drop unused header

Header is not used here.

11 years agocleanup: use string directly
Zdenek Kabelac [Fri, 22 Nov 2013 12:24:53 +0000 (13:24 +0100)]
cleanup: use string directly

11 years agocleanup: simplify pv uuid display
Zdenek Kabelac [Fri, 22 Nov 2013 12:23:31 +0000 (13:23 +0100)]
cleanup: simplify  pv uuid display

Shorter code with explicit type casting.

11 years agocleanup: use safe iterator
Zdenek Kabelac [Fri, 22 Nov 2013 12:18:02 +0000 (13:18 +0100)]
cleanup: use safe iterator

Simplify code and use dm_list_iterate_items_safe() and avoid
scanning the list mutliple times.
Use dm_list_move().

11 years agocleanup: use trigraph
Zdenek Kabelac [Fri, 22 Nov 2013 12:15:47 +0000 (13:15 +0100)]
cleanup: use trigraph

Shorter code...

11 years agodmeventd: drop duplicated code
Zdenek Kabelac [Fri, 22 Nov 2013 09:01:52 +0000 (10:01 +0100)]
dmeventd: drop duplicated code

Do not call pthread_attr_init() twice.
The second call has all proper tests.

11 years agosnapshot: code move
Zdenek Kabelac [Fri, 22 Nov 2013 17:19:13 +0000 (18:19 +0100)]
snapshot: code move

Move some code lines in front, they will be shared with thin snapshot
merge later.

11 years agofix missing header
Zdenek Kabelac [Fri, 22 Nov 2013 19:44:25 +0000 (20:44 +0100)]
fix missing header

11 years agodo_flock: mark descriptor as closed
Zdenek Kabelac [Fri, 22 Nov 2013 12:16:12 +0000 (13:16 +0100)]
do_flock: mark descriptor as closed

Keep the structure content valid in error path
and mark descriptor as closed (-1).

11 years agoarchiver: add check for dm_pool_strdup
Zdenek Kabelac [Fri, 22 Nov 2013 12:12:35 +0000 (13:12 +0100)]
archiver: add check for dm_pool_strdup

It will likely not fail to duplicate empty string, but
just keep the test of result of this function consistent.

Also on error path restore extent_size if in some
case someone would still use that variable.

11 years agodev-type: use text format as direct arg for printf
Zdenek Kabelac [Fri, 22 Nov 2013 11:57:35 +0000 (12:57 +0100)]
dev-type: use text format as direct arg for printf

Put common printf() case into a function and use
the string with text format as direct arg to make
the compile time validation of args easier and
code shorter.

Switch log_error() to log_warn(), since 'return 0'
doesn't cause any failure here.

11 years agodmeventd: move format text to printf
Zdenek Kabelac [Fri, 22 Nov 2013 11:54:59 +0000 (12:54 +0100)]
dmeventd: move format text to printf

Instead of passing argument with format string to printf(),
put the string as arg directly.
Also move there remains args to make the code shorter.

11 years agoactivate: modify read_only when dev_manager exists
Zdenek Kabelac [Fri, 22 Nov 2013 09:00:00 +0000 (10:00 +0100)]
activate: modify read_only when dev_manager exists

Change opts only when dm has been successfully created.
So on the error path we leave structure unmodified.

11 years agosnapshot: use lv_check_not_in_use
Zdenek Kabelac [Fri, 22 Nov 2013 14:27:47 +0000 (15:27 +0100)]
snapshot: use lv_check_not_in_use

Instead of plain open_count check, try to use 'smarter'
lv_check_not_in_use() function.

11 years agosnapshot: revert and move check to lvconvert
Zdenek Kabelac [Fri, 22 Nov 2013 13:52:35 +0000 (14:52 +0100)]
snapshot: revert and move check to lvconvert

Revert 4777eb68728859a0b3651e29c628111ed7c99103 which put
target_present check into init_snapshot_merge(). However
this function is also used when parsing metadata. So we would
get this present test performed even when target is not really
needed. So move this target_present test directly into lvconvert.

11 years agopv_write: check for lvmcache_add_mda failure
Zdenek Kabelac [Fri, 22 Nov 2013 12:25:27 +0000 (13:25 +0100)]
pv_write: check for lvmcache_add_mda failure

Add missing test of failing lvmcache_add_mda() call.

11 years agoreport: detect dev_get_size failure
Zdenek Kabelac [Fri, 22 Nov 2013 12:21:52 +0000 (13:21 +0100)]
report: detect dev_get_size failure

Since dev_get_size() may fail, detect this failure.

11 years agofilters: drop extra slash from sysfs path
Zdenek Kabelac [Thu, 21 Nov 2013 16:50:12 +0000 (17:50 +0100)]
filters: drop extra slash from sysfs path

Sysfs filter was using '/sys//class/block' with double '//' inside.
Remove this extra '/'.
Also simplify code around and use loop to try those paths.

11 years agotoollib: Avoid undefined ignore_vg parameter.
Alasdair G Kergon [Fri, 22 Nov 2013 18:11:04 +0000 (18:11 +0000)]
toollib: Avoid undefined ignore_vg parameter.

Fix process_each_segment_in_pv to always set ret before calling ignore_vg().

11 years agoliblvm/python API: Additions & fixes
Tony Asleson [Tue, 19 Nov 2013 20:54:18 +0000 (14:54 -0600)]
liblvm/python API: Additions & fixes

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython_lvm_unit.py: Add test for new name validate methods
Tony Asleson [Mon, 18 Nov 2013 21:09:09 +0000 (15:09 -0600)]
python_lvm_unit.py: Add test for new name validate methods

Test naming validate names for VG and LV names.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython_lvm_unit.py: Clean-up method names & scope
Tony Asleson [Mon, 18 Nov 2013 21:07:32 +0000 (15:07 -0600)]
python_lvm_unit.py: Clean-up method names & scope

Changed naming of methods from camel case to all lower case with
underscores per guidelines.  Changed any methods that can be
static methods to static.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Remove forward declarations.
Tony Asleson [Thu, 3 Oct 2013 21:06:05 +0000 (16:06 -0500)]
lvm2app: Remove forward declarations.

Remove the forward struct declaration.  This isn't needed for
implementing opaque data pointers.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Reset buffer after retrieving error message
Tony Asleson [Thu, 26 Sep 2013 17:19:18 +0000 (12:19 -0500)]
lvm2app: Reset buffer after retrieving error message

The error buffer will stack error messages which is fine.  However,
once you retrieve the error messages it doesn't make sense to keep
appending for each additional error message when running in the
context of a library call.

This patch clears and resets the buffer after the user retrieves
the error message.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: VG/LV name validation.
Tony Asleson [Thu, 26 Sep 2013 16:39:40 +0000 (11:39 -0500)]
python-lvm: VG/LV name validation.

Python portion of
https://bugzilla.redhat.com/show_bug.cgi?id=883689

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add VG/LV name validation
Tony Asleson [Thu, 26 Sep 2013 16:37:40 +0000 (11:37 -0500)]
lvm2app: Add VG/LV name validation

C library portion for
https://bugzilla.redhat.com/show_bug.cgi?id=883689

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Update and enable unit test case
Tony Asleson [Wed, 11 Sep 2013 23:13:18 +0000 (18:13 -0500)]
python-lvm: Update and enable unit test case

Added tests for lvm.pvCreate and enable the test suite.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Add addl. PV create arguments
Tony Asleson [Tue, 10 Sep 2013 23:05:28 +0000 (18:05 -0500)]
python-lvm: Add addl. PV create arguments

Added overloaded PV create arguments with defaults for PV
creation.

Addresses bug: https://bugzilla.redhat.com/show_bug.cgi?id=880395

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agolvm2app: Add ability to create PV with args
Tony Asleson [Tue, 10 Sep 2013 23:01:28 +0000 (18:01 -0500)]
lvm2app: Add ability to create PV with args

Add a PV create which takes a paramters object that
has get/set method to configure PV creation.

Current get/set operations include:
- size
- pvmetadatacopies
- pvmetadatasize
- data_alignment
- data_alignment_offset
- zero

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=880395

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Test case change for vg.reduce
Tony Asleson [Tue, 10 Sep 2013 22:59:45 +0000 (17:59 -0500)]
python-lvm: Test case change for vg.reduce

Fix reduce as newly changed vg reduce fails when you
try to remove the last pv in the vg.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agometadata.c: Call refactored vgreduce_single
Tony Asleson [Tue, 3 Sep 2013 23:07:43 +0000 (18:07 -0500)]
metadata.c: Call refactored vgreduce_single

Replace the code with the refactored vgreduce_single instead
of calling its own implementation.

Corrects bug: https://bugzilla.redhat.com/show_bug.cgi?id=989174

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agovgreduce: Move _vgreduce_single functionality
Tony Asleson [Tue, 3 Sep 2013 22:31:45 +0000 (17:31 -0500)]
vgreduce: Move _vgreduce_single functionality

Moving the core functionality of vgreduce single into
lib/metadata/vg.c so that the command line and lvm2app library
can call the same core functionality.  New function is
vgreduce_single.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Ensure library handle is correct after python gc() call
Tony Asleson [Wed, 31 Jul 2013 20:16:01 +0000 (15:16 -0500)]
python-lvm: Ensure library handle is correct after python gc() call

In a previous commit we added the ability for the library to do garbage
collection, to free all the memory used by the library handle buffer by closing
and re-opening the library handle.  When we introduced this functionality we
also opened up the opportunity that the user of the python bindings to have
an object that references the old library handle.  In this case if the user
tried to use the old object a segmentation fault could occur because the
memory had been previously freed.

This patch tries to mitigate this by storing a copy of the library handle that
was used when the object was created so that it can compare the current in
use pointer with what existed when the object was created.  In the case where
they match the operation is permitted to continue, otherwise an exception is
throw, thus avoiding a segmentation fault.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agopython-lvm: Correct names
Tony Asleson [Wed, 31 Jul 2013 16:56:41 +0000 (12:56 -0400)]
python-lvm: Correct names

The existing names do not follow accepted guidelines.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
11 years agotests: skip raid test on 3.12.0
Zdenek Kabelac [Tue, 19 Nov 2013 10:47:28 +0000 (11:47 +0100)]
tests: skip raid test on 3.12.0

3.12.0 kernel prevents raid test to be usable,
leaving unremovable devices in table.

This needs to be fixed ASAP, meanwhile disable test to make
test machines at least usable.

11 years agotests: on 32bit test with <16T devs
Zdenek Kabelac [Fri, 15 Nov 2013 22:47:14 +0000 (23:47 +0100)]
tests: on 32bit test with <16T devs

Add  'can_use_16T' to detect systems where we could
safely use 16T devices without causing system deadlocks.

16T size leads on those to endless loops in udevd
- it calls blkid which tries cached read from such device
- this ends in endless loop.

Related problems:
https://bugzilla.redhat.com/show_bug.cgi?id=1015028

11 years agoMakefile: fix build in non src dir
Zdenek Kabelac [Fri, 15 Nov 2013 22:44:18 +0000 (23:44 +0100)]
Makefile: fix build in non src dir

Fix 'make install' from builddir != srcdir.

11 years agometadata: Make the fid mda routines a little more resilient.
Petr Rockai [Mon, 18 Nov 2013 17:00:49 +0000 (18:00 +0100)]
metadata: Make the fid mda routines a little more resilient.

11 years agolvmetad: Set up device pointers in synthetic lvmcache_infos.
Petr Rockai [Mon, 18 Nov 2013 16:53:45 +0000 (17:53 +0100)]
lvmetad: Set up device pointers in synthetic lvmcache_infos.

11 years agotest: Force label-based reporting in pv-duplicate.sh.
Petr Rockai [Mon, 18 Nov 2013 16:53:06 +0000 (17:53 +0100)]
test: Force label-based reporting in pv-duplicate.sh.

11 years agoreport: Print UUIDs for missing PVs when possible.
Petr Rockai [Sun, 17 Nov 2013 21:36:13 +0000 (22:36 +0100)]
report: Print UUIDs for missing PVs when possible.

11 years agometadata: Do not throw an error in pv_label for missing PVs.
Petr Rockai [Sun, 17 Nov 2013 21:35:16 +0000 (22:35 +0100)]
metadata: Do not throw an error in pv_label for missing PVs.

11 years agodev-cache.c: Make dev_name a little more robust.
Petr Rockai [Sun, 17 Nov 2013 21:34:56 +0000 (22:34 +0100)]
dev-cache.c: Make dev_name a little more robust.

11 years agoreport: Convert pv_mda_size to a type "label" field.
Petr Rockai [Sun, 17 Nov 2013 20:04:07 +0000 (21:04 +0100)]
report: Convert pv_mda_size to a type "label" field.

11 years agoreporter: Adapt pvseg reporting to label-type fields.
Petr Rockai [Wed, 28 Aug 2013 12:11:59 +0000 (14:11 +0200)]
reporter: Adapt pvseg reporting to label-type fields.

11 years agoreporter: Deal correctly with dummy PVs/labels.
Petr Rockai [Wed, 28 Aug 2013 12:07:26 +0000 (14:07 +0200)]
reporter: Deal correctly with dummy PVs/labels.

11 years agotoollib: Report errors on non-PV arguments to process_each_label.
Petr Rockai [Tue, 20 Aug 2013 23:32:51 +0000 (01:32 +0200)]
toollib: Report errors on non-PV arguments to process_each_label.

11 years agopv_label: NULL result is not always an internal error.
Petr Rockai [Tue, 20 Aug 2013 23:30:38 +0000 (01:30 +0200)]
pv_label: NULL result is not always an internal error.

11 years agoreport: Make PV UUID into a "label" type field.
Petr Rockai [Mon, 29 Jul 2013 17:15:31 +0000 (19:15 +0200)]
report: Make PV UUID into a "label" type field.

11 years agoreport: Iterate over labels instead of PVs for label-only reports.
Petr Rockai [Mon, 29 Jul 2013 17:14:51 +0000 (19:14 +0200)]
report: Iterate over labels instead of PVs for label-only reports.

11 years agoreport: Make PMdaFree into a "label" field.
Petr Rockai [Mon, 29 Jul 2013 17:14:10 +0000 (19:14 +0200)]
report: Make PMdaFree into a "label" field.

11 years agoreport: Adapt _pvfmt_disp to label-based reporting.
Petr Rockai [Mon, 29 Jul 2013 14:00:40 +0000 (16:00 +0200)]
report: Adapt _pvfmt_disp to label-based reporting.

11 years agoreport: Add a proper "label" field type.
Petr Rockai [Mon, 29 Jul 2013 17:07:11 +0000 (19:07 +0200)]
report: Add a proper "label" field type.

11 years agoreport: Make dev_size and dev_name columns' type "label".
Petr Rockai [Mon, 29 Jul 2013 17:05:28 +0000 (19:05 +0200)]
report: Make dev_size and dev_name columns' type "label".

11 years agolabel: Track a device pointer in struct label.
Petr Rockai [Mon, 29 Jul 2013 17:03:20 +0000 (19:03 +0200)]
label: Track a device pointer in struct label.

11 years agometadata: Add a pv_label accessor (go from a PV to its label).
Petr Rockai [Mon, 29 Jul 2013 16:54:59 +0000 (18:54 +0200)]
metadata: Add a pv_label accessor (go from a PV to its label).

11 years agometadata: Add lvmcache_info_mda_free as a companion to pv_mda_free.
Petr Rockai [Mon, 29 Jul 2013 16:52:28 +0000 (18:52 +0200)]
metadata: Add lvmcache_info_mda_free as a companion to pv_mda_free.

11 years agotoollib: Implement process_each_label.
Petr Rockai [Mon, 29 Jul 2013 16:51:27 +0000 (18:51 +0200)]
toollib: Implement process_each_label.

11 years agolabeller: Make the use of "private" as "fmt" explicit.
Petr Rockai [Mon, 29 Jul 2013 13:58:18 +0000 (15:58 +0200)]
labeller: Make the use of "private" as "fmt" explicit.

All labellers always use the "private" (void *) field as the fmt pointer. Making
this fact explicit in the type of the labeller simplifies the label reporting
code which needs to extract the format. Moreover, it removes a number of
error-prone casts from the code.

11 years agometadata: Nuke the exported "pv_read" function.
Petr Rockai [Tue, 19 Feb 2013 09:57:45 +0000 (10:57 +0100)]
metadata: Nuke the exported "pv_read" function.

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