]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoAdd inital thin testing
Zdenek Kabelac [Fri, 16 Sep 2011 12:23:59 +0000 (12:23 +0000)]
Add inital thin testing

Currently test is skipped by default (since it needs code hack to work)
Check command line options to create & remove thin pools and thin volumes.

Activation code for thin LV support is missing, thus it only works without
driver loaded.

12 years agoRemove thin volumes before thin pools
Zdenek Kabelac [Fri, 16 Sep 2011 12:12:51 +0000 (12:12 +0000)]
Remove thin volumes before thin pools

When user wants to remove thin pool - check if there are no thin volumes using it.
If so - query before removal (or -ff for no question) and remove them first.

12 years agoFix command line option decoding
Zdenek Kabelac [Fri, 16 Sep 2011 12:10:02 +0000 (12:10 +0000)]
Fix command line option decoding

LVM has huge set of options now - it's approaching 60 short-arg less options
and we get interesting case of misdetection for 'merge' option which has been
put into the middle of options with 'short_arg' - thus certainly past 65. (ASCII 'A').

To avoid confusion of short_arg with long_opt number - add  '128' to all such
non-short-arg options.

12 years agoUpdate
Zdenek Kabelac [Fri, 16 Sep 2011 12:01:48 +0000 (12:01 +0000)]
Update

12 years agoReset LV status when unlinking LV from VG
Zdenek Kabelac [Fri, 16 Sep 2011 11:59:22 +0000 (11:59 +0000)]
Reset LV status when unlinking LV from VG

When LV is unlinked, we want to catch problem in vg_validate,
that LV has changed.

i.e. catch LV has been removed and is no long thin_pool while still
being referenced by some thin volume.

12 years agoTrim spaces on EOL
Zdenek Kabelac [Fri, 16 Sep 2011 11:53:14 +0000 (11:53 +0000)]
Trim spaces on EOL

12 years agoRemove vg at the test's end
Zdenek Kabelac [Fri, 16 Sep 2011 11:52:33 +0000 (11:52 +0000)]
Remove vg at the test's end

Speedup this test by removing mirrored vg when it's not longer needed.
teardown() seems to be waiting here for too long.

12 years agoUpdate WHATS_NEW.
Petr Rockai [Fri, 16 Sep 2011 10:02:14 +0000 (10:02 +0000)]
Update WHATS_NEW.

12 years agoFix the divisibility check in the allocator for the mirror+stripe case (require
Petr Rockai [Fri, 16 Sep 2011 09:59:42 +0000 (09:59 +0000)]
Fix the divisibility check in the allocator for the mirror+stripe case (require
divisibility by stripe count alone, not by (mirror*stripe)).

12 years agoUpdate WHATS_NEW.
Petr Rockai [Thu, 15 Sep 2011 20:01:21 +0000 (20:01 +0000)]
Update WHATS_NEW.

12 years agoWhen resizing LVs, always round in the safe direction, regardless of whether we
Petr Rockai [Thu, 15 Sep 2011 18:51:11 +0000 (18:51 +0000)]
When resizing LVs, always round in the safe direction, regardless of whether we
were called as lvresize or lvreduce.

12 years agoFix possible overflow of size if %FREE or %VG is used.
Milan Broz [Thu, 15 Sep 2011 15:26:40 +0000 (15:26 +0000)]
Fix possible overflow of size if %FREE or %VG is used.

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

12 years agoFix vgchange activation of snapshot with virtual origin.
Milan Broz [Wed, 14 Sep 2011 18:20:03 +0000 (18:20 +0000)]
Fix vgchange activation of snapshot with virtual origin.

12 years agoFix memory overwrite
Zdenek Kabelac [Wed, 14 Sep 2011 16:07:07 +0000 (16:07 +0000)]
Fix memory overwrite

Transfer of build_dm_uuid() function into libdm made uuid_prefix as parameter,
thus sizeof() was replaced with strlen() and room for '\0' missed.

As it's only fix in current version - no whatsnew.

12 years agoActivate virtual snapshot origin exclusively (only on local node in cluster).
Milan Broz [Wed, 14 Sep 2011 14:20:16 +0000 (14:20 +0000)]
Activate virtual snapshot origin exclusively (only on local node in cluster).

12 years agoAdd suggest parentheses around '&&'
Zdenek Kabelac [Wed, 14 Sep 2011 10:03:15 +0000 (10:03 +0000)]
Add suggest parentheses around '&&'

Follow gcc suggestion.

12 years agoLVM_WRITE and LVM_READ are 64bit constants
Zdenek Kabelac [Wed, 14 Sep 2011 09:57:35 +0000 (09:57 +0000)]
LVM_WRITE and LVM_READ are 64bit constants

Revert John patch, which fixed only 1 place where ~LVM_WRITE was in use and
convert ommited LVM_READ/WRITE flags to 64bit constants as well.
(Since both 'status' flags for LV and VG are 64bit.)

12 years agoAdd missing underscores to local static functions
Zdenek Kabelac [Wed, 14 Sep 2011 09:54:21 +0000 (09:54 +0000)]
Add missing underscores to local static functions

12 years agoKeep the old-style function definition
Zdenek Kabelac [Wed, 14 Sep 2011 09:53:32 +0000 (09:53 +0000)]
Keep the old-style function definition

12 years agoAdditional fixes for lv_mirror_count.
Jonathan Earl Brassow [Wed, 14 Sep 2011 04:10:26 +0000 (04:10 +0000)]
Additional fixes for lv_mirror_count.

Changing lv_mirror_count to only count the AREA_LVs made the function
stop working for PVMOVE mirrors.  A conditional has been added to fix
that problem.  Additionally, when counting the images in a mirror stack,
we don't need to subtract 1 from the count we get back from the
lv_mirror_count call on the temporary mirror layer.  (This is because we
are no falsely counting the top layer of the temporary mirror.)

12 years agoFix for bug 734252 - problem up converting striped mirror after image failure
Jonathan Earl Brassow [Wed, 14 Sep 2011 02:45:36 +0000 (02:45 +0000)]
Fix for bug 734252 - problem up converting striped mirror after image failure

lv_mirror_count was not able to handle mirrors of stripes properly.  When a
failed device is removed, the MIRRORED status flag is removed from the LV
conditionally based on the results of lv_mirror_count.  However, lv_mirror_count
trusted the MIRRORED flag - thinking any such LV must be mirrored.  It would
happily assign first_seg(lv)->area_count as the number of mirrors, but when
a mirrored striped LV was reduced to a simple striped LV area_count would be
the number of /stripes/ not the number of /mirrors/.  A result higher than 1
would be returned from lv_mirror_count, the MIRRORED flag would not be cleared,
and the LV would fail to be up-converted properly in lvconvert_mirrors_aux
because of it.

12 years agoFix bug 733400 - Mirror down conversion when specifying the secondary leg is broke
Jonathan Earl Brassow [Tue, 13 Sep 2011 21:13:33 +0000 (21:13 +0000)]
Fix bug 733400 - Mirror down conversion when specifying the secondary leg is broke

The operation of deactivating the residual error target LV after removing a
mirror layer can cause a "device in-use" conflict with udev.  Giving udev a
poke before calling deactivate_lv eliminates the conflict.  The stick used
to poke udev is 'sync_local_dev_names'.

12 years agoFix for bug 737200 - Can't create mirrored-log mirror on a VG with small extents
Jonathan Earl Brassow [Tue, 13 Sep 2011 18:42:57 +0000 (18:42 +0000)]
Fix for bug 737200 - Can't create mirrored-log mirror on a VG with small extents

Kernel requires a mirror to be at least 1 region large.  So,
if our mirror log is itself a mirror, it must be at least
1 region large.  This restriction may not be necessary for
non-mirrored logs, but we apply the rule anyway.

(The other option is to make the region size of the log
mirror smaller than the mirror it is acting as a log for,
but that really complicates things.  It's much easier to
keep the region_size the same for both.)

12 years agoBetter fix for bug 737125 - unable to create mirror on 1K extent size VG
Jonathan Earl Brassow [Tue, 13 Sep 2011 18:11:38 +0000 (18:11 +0000)]
Better fix for bug 737125 - unable to create mirror on 1K extent size VG

WHATS_NEW entry:
Fix log size calculation when only a log is being added to a mirror.

The original fix pass the mirror LV to allocate_extents (rather than
passing NULL) so that _alloc_init could correctly determine the necessary
size of the mirror log.  In the previous check-in, I noted:
    In order to get a decent value computed, we need to pass in the 'lv' argument
    to allocate_extents.  This would normally imply a desire for cling/contiguous
    allocation to the given LV, but since we are not allocating any parallel
    extents and only log extents, it works fine.
However, passing in the LV did have unintended consequences on the placement of
the log.  The better solution is to pass in the number of extext that are in
the mirror LV instead of the LV itself.  This will not cause the allocator to
reserve that number of extents, because 'stripes' and 'mirrors' are specified
as 0.  Thus, 'extents' is used to calculate the size of the log, but won't
affect how much is allocated.

12 years agoChanging RAID status flags to 64-bit broke some binary flag operations.
Jonathan Earl Brassow [Tue, 13 Sep 2011 16:33:21 +0000 (16:33 +0000)]
Changing RAID status flags to 64-bit broke some binary flag operations.

LVM_WRITE is a 32-bit flag.  Now that RAID[_IMAGE|_META] are 64-bit,
and'ing a RAID LV's status against LVM_WRITE can reset the higher order
flags.

A similar thing will affect thinp flags if not careful.

12 years agoRetry DM_DEVICE_REMOVE ioctl if device is busy.
Peter Rajnoha [Tue, 13 Sep 2011 15:13:41 +0000 (15:13 +0000)]
Retry DM_DEVICE_REMOVE ioctl if device is busy.

This is a workaround for long-lasting problem with using the WATCH udev
rule. When trying to remove a DM device, this one can still be opened
while processing the event in parallel (generated based on the WATCH
udev rule).

Let's use this until we have a proper solution.

12 years agoFix for bug 737125 - unable to create mirror on 1K extent size VG
Jonathan Earl Brassow [Tue, 13 Sep 2011 14:37:48 +0000 (14:37 +0000)]
Fix for bug 737125 - unable to create mirror on 1K extent size VG

_alloc_init calculates the number of necessary log extents via
'mirror_log_extents'.  'mirror_log_extents' takes 3 arguments: region_size,
pe_size, and size of the mirror LV.  Unfortunately, _alloc_init is guessing at
the mirror size by using 'ah->new_extents / ah->area_multiple' - the number of
extents that the mirror images have.  However, this is /always/ wrong when
allocating the log separately.  Further, the log is always allocated separately
unless we are up-converting the mirror at the same time.  It was by luck alone
that a default value of '1' reflects what we want in most cases.

In order to get a decent value computed, we need to pass in the 'lv' argument
to allocate_extents.  This would normally imply a desire for cling/contiguous
allocation to the given LV, but since we are not allocating any parallel
extents and only log extents, it works fine.

12 years agoFix for bug 733114.
Jonathan Earl Brassow [Tue, 13 Sep 2011 13:59:19 +0000 (13:59 +0000)]
Fix for bug 733114.

When an image is split from a 2-way mirror, the original mirror is converted to
a linear device.  To do this, the top "layer" must be removed.  The segments
are transferred from the sub-lv to the top-level LV and the link is severed.
The former sub-lv - having its segments transferred - now contains a temporary
error target.

When the original LV is resumed, the old sub-lv that now contains an error
segment is activated and scanned.  This is what causes the I/O error messages.
There are three ways to fix this problem:

1) Do not set the sub-lv which contains the error target as "visible" before
suspending the original LV.  This way, when the original is resumed, the sub-lv
device node is not created and it is not scanned - avoiding the error messages.
 The problem with this approach is that if the machine crashes after the
resume, it leaves the *hidden* LV in place and the user has a more difficult
time noticing that it needs to be cleaned up.  Thus, this type of processing is
frowned upon.

2) Do like _remove_mirror_images does and suspend the original, then suspend
the sub-lv (the error target), then resume the sub-lv, and finally resume the
original LV.  This seems like extra pointless operations to me, but it does not
produce the error message (although, I'm not sure why) and it allows us to
leave the visible flag in place.

3) Flag the sub-lv (error target) with a "do not scan" flag.  This seems like
the cleanest approach, but I have been unable to find the method for doing
this.  LVs get tagged in such a way by _get_udev_flags, but in this case the
resume of the original LV also resumes the error target LV without running it
through _get_udev_flags (likely because they are no longer linked).  Could
there be something wrong in resume_lv?

Option #2 was chosen to fix this bug, but it seems like more of a workaround
for now.

12 years agoreorder some status flag printing in gdbinit file.
Jonathan Earl Brassow [Tue, 13 Sep 2011 13:57:02 +0000 (13:57 +0000)]
reorder some status flag printing in gdbinit file.

12 years agoUpdated testing script
Zdenek Kabelac [Fri, 9 Sep 2011 13:19:19 +0000 (13:19 +0000)]
Updated testing script

Since attrs were extended by 2 new fields update check functions.

12 years agoAppend z to lv_attr if new blocks will be zeroed.
Alasdair Kergon [Fri, 9 Sep 2011 01:15:18 +0000 (01:15 +0000)]
Append z to lv_attr if new blocks will be zeroed.

12 years agoAdd a new 'thin_pool' output field to 'lvs.
Alasdair Kergon [Fri, 9 Sep 2011 00:54:49 +0000 (00:54 +0000)]
Add a new 'thin_pool' output field to 'lvs.

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.

12 years agoAdjust gdbinit script to new RAID status flag values.
Jonathan Earl Brassow [Thu, 8 Sep 2011 22:19:45 +0000 (22:19 +0000)]
Adjust gdbinit script to new RAID status flag values.

12 years agoAdd 7th lv_attr char to show the related kernel target.
Alasdair Kergon [Thu, 8 Sep 2011 20:55:39 +0000 (20:55 +0000)]
Add 7th lv_attr char to show the related kernel target.
Add thin volume types to lv_attr.

12 years agolvcreate/remove thin_pool and thin volumes (--driverloaded n only)
Alasdair Kergon [Thu, 8 Sep 2011 16:41:18 +0000 (16:41 +0000)]
lvcreate/remove thin_pool and thin volumes (--driverloaded n only)

12 years agoTerminate pv_attr field correctly. (2.02.86)
Alasdair Kergon [Wed, 7 Sep 2011 13:42:00 +0000 (13:42 +0000)]
Terminate pv_attr field correctly. (2.02.86)

12 years agoFix typo
Zdenek Kabelac [Wed, 7 Sep 2011 09:48:49 +0000 (09:48 +0000)]
Fix typo

12 years agoCheck if lp.origin exists
Zdenek Kabelac [Wed, 7 Sep 2011 09:25:51 +0000 (09:25 +0000)]
Check if lp.origin exists

Currently needed for _determine_snapshot_type().

12 years agoImprove man page style
Zdenek Kabelac [Wed, 7 Sep 2011 08:50:35 +0000 (08:50 +0000)]
Improve man page style

Only reformat man pages.

12 years agoSupport break for vgchange and vgrefresh operation
Zdenek Kabelac [Wed, 7 Sep 2011 08:41:47 +0000 (08:41 +0000)]
Support break for vgchange and vgrefresh operation

Allow to break some lengthy vgchange and vgrefresh operation.

12 years agoRemove unused passed parameters
Zdenek Kabelac [Wed, 7 Sep 2011 08:37:48 +0000 (08:37 +0000)]
Remove unused passed parameters

12 years agoMinor change for pv_create api
Zdenek Kabelac [Wed, 7 Sep 2011 08:34:21 +0000 (08:34 +0000)]
Minor change for pv_create api

Switch int to unsigned type.

12 years agoReplace char class :space: with explicit chars
Zdenek Kabelac [Wed, 7 Sep 2011 08:31:16 +0000 (08:31 +0000)]
Replace char class :space: with explicit chars

Some major distributions are still using 'mawk' and they are not using
the latest version - we end here with hidden dependency on the latest
version of mawk (1.3.4) while i.e. Debian Lenny seems to stay with 1.3.3.
So we end with completely broken  vgimportclone script on such system.

We would need to check for proper support of :space: and abort build if
it doesn't work or simplier replace [:space:] with [ \t] which seems
sufficient to make it work (as can be seen in this patch)

A better fix would be to use command line parameter override - leaving
as FIXME comment.

This patch makes t-vgimportclone.sh test passing on Lenny.

12 years agopool attach fns & more field renaming
Alasdair Kergon [Tue, 6 Sep 2011 22:43:56 +0000 (22:43 +0000)]
pool attach fns & more field renaming

12 years agoConvert data->pool
Zdenek Kabelac [Tue, 6 Sep 2011 22:35:44 +0000 (22:35 +0000)]
Convert data->pool

12 years agoadd thin_manip.c like the other manip files
Alasdair Kergon [Tue, 6 Sep 2011 19:25:42 +0000 (19:25 +0000)]
add thin_manip.c like the other manip files
move basic lv_is_* to macros
data_lv -> pool_lv - we decided to call it 'pool' everywhere now

12 years agoStart using 64-bit status flags - most of the code already handles them.
Alasdair Kergon [Tue, 6 Sep 2011 18:49:31 +0000 (18:49 +0000)]
Start using 64-bit status flags - most of the code already handles them.
tdata -> tpool
remove commented out definitions from metadata.h
formatting clean-ups

12 years agoDetect sscanf recovering_region input error
Zdenek Kabelac [Tue, 6 Sep 2011 18:24:27 +0000 (18:24 +0000)]
Detect sscanf recovering_region input error

Missing check for sscanf found by static analyzer.

12 years agoFix memory leak of allocated bitmap in error path
Zdenek Kabelac [Tue, 6 Sep 2011 18:15:43 +0000 (18:15 +0000)]
Fix memory leak of allocated bitmap in error path

Found by static analyzer.

12 years agoLog unlink() error
Zdenek Kabelac [Tue, 6 Sep 2011 18:11:21 +0000 (18:11 +0000)]
Log unlink() error

12 years agoelse
Alasdair Kergon [Tue, 6 Sep 2011 15:39:46 +0000 (15:39 +0000)]
else

12 years agotdata->tpool
Alasdair Kergon [Tue, 6 Sep 2011 15:38:44 +0000 (15:38 +0000)]
tdata->tpool

12 years agoonly thin volumes need converting
Alasdair Kergon [Tue, 6 Sep 2011 15:35:11 +0000 (15:35 +0000)]
only thin volumes need converting

12 years agolvcreate parsing for thin provisioning.
Alasdair Kergon [Tue, 6 Sep 2011 00:26:42 +0000 (00:26 +0000)]
lvcreate parsing for thin provisioning.
The rest is incomplete so this isn't usable yet.

12 years agoRemove incorrect requirement for -j or -m from lvchange error message.
Alasdair Kergon [Mon, 5 Sep 2011 12:54:29 +0000 (12:54 +0000)]
Remove incorrect requirement for -j or -m from lvchange error message.

12 years agoHack for build rules of lvmetad
Zdenek Kabelac [Fri, 2 Sep 2011 14:49:00 +0000 (14:49 +0000)]
Hack for build rules of lvmetad

FIXME

12 years agoAdd missing 'static' for local function
Zdenek Kabelac [Fri, 2 Sep 2011 12:38:43 +0000 (12:38 +0000)]
Add missing 'static' for local function

Avoid missing prototype warning.

12 years agoCompile fix
Zdenek Kabelac [Fri, 2 Sep 2011 11:04:12 +0000 (11:04 +0000)]
Compile fix

Reflecting change in dm_config_value  float r -> float f.

12 years agotemp notes on dealing with cascade
Alasdair Kergon [Fri, 2 Sep 2011 01:59:07 +0000 (01:59 +0000)]
temp notes on dealing with cascade

12 years agoMove cascade inside libdm etc.
Alasdair Kergon [Fri, 2 Sep 2011 01:32:08 +0000 (01:32 +0000)]
Move cascade inside libdm etc.
Makes dumpconfig whole-section output wrong in a different way from before,
but we should be able to merge cft_cmdline properly into cmd->cft now and
remove cascade.

12 years agoComments, FIXMEs, name changes.
Alasdair Kergon [Thu, 1 Sep 2011 21:04:14 +0000 (21:04 +0000)]
Comments, FIXMEs, name changes.

12 years agoUpdates to gdbinit file
Jonathan Earl Brassow [Thu, 1 Sep 2011 21:01:12 +0000 (21:01 +0000)]
Updates to gdbinit file

1) Add more status flags for printing
2) Fix bug in lv_status_r processing for mirror segment type

12 years agoFix for bug 732142: Unsafe table load during mirror image split
Jonathan Earl Brassow [Thu, 1 Sep 2011 19:22:11 +0000 (19:22 +0000)]
Fix for bug 732142: Unsafe table load during mirror image split

There was a bad sequence:
*) Make changes to LV layout to split images (e.g. 4-way -> 2-way/2-way)
1) vg_write, suspend_lv(original_mirror), vg_commit
2) activate_lv(newly_split_lv)
3) resume_lv(original_mirror)

Step #2 is not allowed.  However, without it, the resume of the original
mirror will also resume its former sub-LVs - making it impossible to
activate the newly split LV due to the changes in layering, pointers, and
names that had already been made.  Additionally, the resume or the original
brings the sub-lv's online with names that differ from the metadata on disk -
also a no-no.  Thus, the split must be done in stages such that the active LVs
always reflect what is in the committed LVM metadata.

First, alter the original mirror by releasing the images.  The images are made
visible and independent as an intermediate stage.  (This way, we can have
consistency between LVM metadata and active LVs.)  The second stage collects
the recently split LVs, deactivates them, forms them into a mirror if necessary,
and then activates them.  It is a bit of a circuitous method, but it is the only
way to split a mirror from a mirror and obey these general rules:
1) Never [de]activate sub-lvs when the top-level LV is suspended
2) Avoid having active LVs that differ from the description in the LVM metadata

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
12 years agoAdd comments & remove always-included header.
Alasdair Kergon [Thu, 1 Sep 2011 17:58:27 +0000 (17:58 +0000)]
Add comments & remove always-included header.

12 years agoOnly build libdaemon.a when we need it at the moment.
Alasdair Kergon [Thu, 1 Sep 2011 17:56:53 +0000 (17:56 +0000)]
Only build libdaemon.a when we need it at the moment.

12 years agoUse const casting when it's needed
Zdenek Kabelac [Thu, 1 Sep 2011 14:02:05 +0000 (14:02 +0000)]
Use const casting when it's needed

Keep the lookup operation const and use const casting at the dm_ function level.

12 years agoMatch the prototype old-style declaration
Zdenek Kabelac [Thu, 1 Sep 2011 13:30:11 +0000 (13:30 +0000)]
Match the prototype old-style declaration

12 years agoKeep the old-style prototypes
Zdenek Kabelac [Thu, 1 Sep 2011 13:25:50 +0000 (13:25 +0000)]
Keep the old-style prototypes

12 years agoUse size_t return type
Zdenek Kabelac [Thu, 1 Sep 2011 10:25:22 +0000 (10:25 +0000)]
Use size_t return type

Since these function returns buffer size - use size_t type for them.

12 years agoMark unreleased memory pools as internal error
Zdenek Kabelac [Thu, 1 Sep 2011 10:19:01 +0000 (10:19 +0000)]
Mark unreleased memory pools as internal error

12 years agoReflect dm_config API update
Zdenek Kabelac [Thu, 1 Sep 2011 10:16:32 +0000 (10:16 +0000)]
Reflect dm_config API update

12 years agoReplace const usage of dm_config_find_node with more appropriate value-lookup
Petr Rockai [Wed, 31 Aug 2011 15:19:19 +0000 (15:19 +0000)]
Replace const usage of dm_config_find_node with more appropriate value-lookup
functionality. A number of bugs (copied and pasted all over the code) should
disappear:

- most string lookup based on dm_config_find_node would segfault when
  encountering a non-zero integer (the intention there was to print an
  error message instead)
- check for required sections in metadata would have been satisfied by
  values as well (i.e. not sections)
- encountering a section in place of expected flag value would have
  segfaulted (due to assumed but unchecked cn->v != NULL)

12 years agoMention --enable-lvmetad in WHATS_NEW.
Petr Rockai [Wed, 31 Aug 2011 12:47:59 +0000 (12:47 +0000)]
Mention --enable-lvmetad in WHATS_NEW.

12 years agoDo not call prepare_lvmetad just yet in tests.
Petr Rockai [Wed, 31 Aug 2011 12:42:55 +0000 (12:42 +0000)]
Do not call prepare_lvmetad just yet in tests.

12 years agoFix warnings and constness handling in lvmetad-core (adjusting the
Petr Rockai [Wed, 31 Aug 2011 12:39:58 +0000 (12:39 +0000)]
Fix warnings and constness handling in lvmetad-core (adjusting the
dm_config_find_node to give non-const node pointer, since that better reflects
the contract of that function).

12 years agoFix warnings in daemons/common.
Petr Rockai [Wed, 31 Aug 2011 12:18:40 +0000 (12:18 +0000)]
Fix warnings in daemons/common.

12 years agoGet rid of the old lvmetad Makefile.
Petr Rockai [Wed, 31 Aug 2011 11:44:27 +0000 (11:44 +0000)]
Get rid of the old lvmetad Makefile.

12 years agoAutoreconf for lvmetad patch
Zdenek Kabelac [Wed, 31 Aug 2011 11:39:32 +0000 (11:39 +0000)]
Autoreconf for lvmetad patch

12 years agoA compromise integration of LVMetaD into the build: I have kept all the
Petr Rockai [Wed, 31 Aug 2011 11:31:57 +0000 (11:31 +0000)]
A compromise integration of LVMetaD into the build: I have kept all the
daemon/common code in a single libdaemon.a, which is completely private. This
is currently linked into the lvmetad binary, and will be linked into LVM (the
client part, since static linking only picks up only symbols that are actually
used). I have also added --enable/disable-lvmetad to ./configure; although the
current default is off, I expect this to be flipped to on shortly. There's no
LVM-side support yet, but when there is, even when built, it'll still need to
be enabled by an lvm.conf option.

12 years agoUpdate for resource leak
Zdenek Kabelac [Wed, 31 Aug 2011 08:23:33 +0000 (08:23 +0000)]
Update for resource leak

12 years agoFix resource leak when strdup fails
Zdenek Kabelac [Wed, 31 Aug 2011 08:23:05 +0000 (08:23 +0000)]
Fix resource leak when strdup fails

Static analyzer noticed, strdup failing path leaks dmt structure.

12 years agoAdapt LVMetaD to use the new dm_config interfaces.
Petr Rockai [Tue, 30 Aug 2011 15:44:01 +0000 (15:44 +0000)]
Adapt LVMetaD to use the new dm_config interfaces.

12 years agoAdapt the daemon/common code to use the new dm_config interface.
Petr Rockai [Tue, 30 Aug 2011 15:42:56 +0000 (15:42 +0000)]
Adapt the daemon/common code to use the new dm_config interface.

12 years agoMove the core of the lib/config/config.c functionality into libdevmapper,
Petr Rockai [Tue, 30 Aug 2011 14:55:15 +0000 (14:55 +0000)]
Move the core of the lib/config/config.c functionality into libdevmapper,
leaving behind the LVM-specific parts of the code (convenience wrappers that
handle `struct device` and `struct cmd_context`, basically). A number of
functions have been renamed (in addition to getting a dm_ prefix) -- namely,
all of the config interface now has a dm_config_ prefix.

12 years agoDirectly allocate buffer memory in a pvck scan instead of using a mempool.
Peter Rajnoha [Mon, 29 Aug 2011 13:37:36 +0000 (13:37 +0000)]
Directly allocate buffer memory in a pvck scan instead of using a mempool.

There's a very high memory usage when calling _pv_analyse_mda_raw (e.g. while
executing pvck) that can end up with "out of memory".

_pv_analyse_mda_raw scans for metadata in the MDA, iteratively increasing the
size to scan with SECTOR_SIZE until we find a probable config section or we're
at the edge of the metadata area. However, when using a memory pool, we're also
iteratively chasing for bigger and bigger mempool chunk which can't be found
and so we're always allocating a new one, consuming more and more memory...

This patch just changes the mempool to direct memory allocation in this
problematic part of the code.

12 years agosame for segtype_is_thin
Alasdair Kergon [Fri, 26 Aug 2011 18:17:05 +0000 (18:17 +0000)]
same for segtype_is_thin

12 years agoseg_is_thin includes both thin_pool and thin_volume
Alasdair Kergon [Fri, 26 Aug 2011 18:15:14 +0000 (18:15 +0000)]
seg_is_thin includes both thin_pool and thin_volume

12 years agothin - hide unimplemented dso fn; remove duplicate origin_lv field; add
Alasdair Kergon [Fri, 26 Aug 2011 17:40:53 +0000 (17:40 +0000)]
thin - hide unimplemented dso fn; remove duplicate origin_lv field; add
some lvcreate struct parms

12 years agoInitial code for read/write of thin metadata lv segments
Zdenek Kabelac [Fri, 26 Aug 2011 13:37:47 +0000 (13:37 +0000)]
Initial code for read/write of thin metadata lv segments

12 years agoAdd registration of thin_pool segment
Zdenek Kabelac [Thu, 25 Aug 2011 10:00:09 +0000 (10:00 +0000)]
Add registration of thin_pool segment

Register thin and thin_pool segment via multiple_segtypes.

12 years agoFix raid shared lib segtype registration (2.02.87).
Alasdair Kergon [Wed, 24 Aug 2011 13:41:46 +0000 (13:41 +0000)]
Fix raid shared lib segtype registration (2.02.87).

12 years agoInitial code layout for thin provisioning target
Zdenek Kabelac [Wed, 24 Aug 2011 08:27:49 +0000 (08:27 +0000)]
Initial code layout for thin provisioning target

Only registers init_thin_segtype

Option --with-thin=internal needed for compilation.
For now useful only for developememt!

12 years ago.
Alasdair Kergon [Fri, 19 Aug 2011 23:01:20 +0000 (23:01 +0000)]
.

12 years agoRemove incorrect error message added in 2.02.87.
Alasdair Kergon [Fri, 19 Aug 2011 22:55:07 +0000 (22:55 +0000)]
Remove incorrect error message added in 2.02.87.

12 years agopost-release
Alasdair Kergon [Fri, 19 Aug 2011 19:42:39 +0000 (19:42 +0000)]
post-release

12 years agoclarify comment
Alasdair Kergon [Fri, 19 Aug 2011 19:35:50 +0000 (19:35 +0000)]
clarify comment

12 years agotweak split/track/merge
Alasdair Kergon [Fri, 19 Aug 2011 17:36:13 +0000 (17:36 +0000)]
tweak split/track/merge
How do you discover the value of N?

12 years agospaces->tabs
Alasdair Kergon [Fri, 19 Aug 2011 17:02:48 +0000 (17:02 +0000)]
spaces->tabs

12 years agorevert incomplete inconsistent log message change for now
Alasdair Kergon [Fri, 19 Aug 2011 16:49:00 +0000 (16:49 +0000)]
revert incomplete inconsistent log message change for now

12 years agoavoid multi-line calc with incorrect intermediate var contents
Alasdair Kergon [Fri, 19 Aug 2011 16:41:26 +0000 (16:41 +0000)]
avoid multi-line calc with incorrect intermediate var contents

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