]> sourceware.org Git - lvm2.git/log
lvm2.git
13 years agoelse
Alasdair Kergon [Tue, 6 Sep 2011 15:39:46 +0000 (15:39 +0000)]
else

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

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

13 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.

13 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.

13 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

13 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.

13 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.

13 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

13 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.

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

13 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

13 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>
13 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.

13 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.

13 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.

13 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

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

13 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.

13 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

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

13 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)

13 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.

13 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.

13 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).

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

13 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.

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

13 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.

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

13 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.

13 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.

13 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.

13 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.

13 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.

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

13 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

13 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

13 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

13 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.

13 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).

13 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!

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

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

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

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

13 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?

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

13 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

13 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

13 years agopre-release
Alasdair Kergon [Fri, 19 Aug 2011 16:31:00 +0000 (16:31 +0000)]
pre-release

13 years agorestrict dm_tree_node_add_null_area
Alasdair Kergon [Fri, 19 Aug 2011 16:26:02 +0000 (16:26 +0000)]
restrict dm_tree_node_add_null_area

13 years ago_ for static fns
Alasdair Kergon [Fri, 19 Aug 2011 15:59:15 +0000 (15:59 +0000)]
_ for static fns

13 years agoMove RAID convert tests to new file, t-lvconvert-raid.sh
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:56:17 +0000 (19:56 +0000)]
Move RAID convert tests to new file, t-lvconvert-raid.sh

There is duplicate code in t-lvconvert-raid.sh and t-lvcreate-raid.sh.
This should be moved into a common file which is then sourced by these two
files.  I'll wait to move the duplicate code until I can talk to mornfall.

13 years agoAdd ability to merge back a RAID1 image that has been split w/ --trackchanges
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:43:08 +0000 (19:43 +0000)]
Add ability to merge back a RAID1 image that has been split w/ --trackchanges

Argument layout is very similar to the merge command for snapshots.

13 years agoAdd support for m-way to n-way up-convert in RAID1 (no linear to n-way yet)
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:41:21 +0000 (19:41 +0000)]
Add support for m-way to n-way up-convert in RAID1 (no linear to n-way yet)

This patch adds the ability to upconvert a raid1 array - say from 2-way to
3-way.  It does not yet support upconverting linear to n-way.

The 'raid' device-mapper target allows for individual components (images) of
an array to be specified for rebuild.  This mechanism is used when adding
new images to the array so that the new images can be resync'ed while the
rest of the images in the array can remain 'in-sync'.  (There is no
mirror-on-mirror layering required.)

13 years agoAdd the ability to split an image from the mirror and track changes.
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:38:26 +0000 (19:38 +0000)]
Add the ability to split an image from the mirror and track changes.

~> lvconvert --splitmirrors 1 --trackchanges vg/lv
The '--trackchanges' option allows a user the ability to use an image of
a RAID1 array for the purposes of temporary read-only access.  The image
can be merged back into the array at a later time and only the blocks that
have changed in the array since the split will be resync'ed.  This
operation can be thought of as a partial split.  The image is never completely
extracted from the array, in that the array reserves the position the device
occupied and tracks the differences between the array and the split image via
a bitmap.  The image itself is rendered read-only and the name (<LV>_rimage_*)
cannot be changed.  The user can complete the split (permanently splitting the
image from the array) by re-issuing the 'lvconvert' command without the
'--trackchanges' argument and specifying the '--name' argument.
~> lvconvert --splitmirrors 1 --name my_split vg/lv
Merging the tracked image back into the array is done with the '--merge'
option (included in a follow-on patch).
~> lvconvert --merge vg/lv_rimage_<n>

The internal mechanics of this are relatively simple.  The 'raid' device-
mapper target allows for the specification of an empty slot in an array
via '- -'.  This is what will be used if a partial activation of an array
is ever required.  (It would also be possible to use 'error' targets in
place of the '- -'.)  If a RAID image is found to be both read-only and
visible, then it is considered separate from the array and '- -' is used
to hold it's position in the array.  So, all that needs to be done to
temporarily split an image from the array /and/ cause the kernel target's
bitmap to track (aka "mark") changes made is to make the specified image
visible and read-only.  To merge the device back into the array, the image
needs to be returned to the read/write state of the top-level LV and made
invisible.

13 years agoAdd --splitmirrors support for RAID1 (1 image only)
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:34:18 +0000 (19:34 +0000)]
Add --splitmirrors support for RAID1 (1 image only)

Users already have the ability to split an image from an LV of "mirror"
segtype.  This patch extends that ability to LVs of "raid1" segtype.

This patch only allows a single image to be split off, however.  (The
"mirror" segtype allows an arbitrary number of images to be split off.
e.g.  4-way => 3-way/linear, 2-way/2-way, linear,3-way)

13 years agoWhen down-converting RAID1, don't activate sub-lvs between suspend/resume
Jonathan Earl Brassow [Thu, 18 Aug 2011 19:31:33 +0000 (19:31 +0000)]
When down-converting RAID1, don't activate sub-lvs between suspend/resume
of top-level LV.

We can't activate sub-lv's that are being removed from a RAID1 LV while it
is suspended.  However, this is what was being used to have them show-up
so we could remove them.  'sync_local_dev_names' is a sufficient and
proper replacement and can be done after the top-level LV is resumed.

13 years agoAdd -V as short form of --virtualsize in lvcreate.
Alasdair Kergon [Wed, 17 Aug 2011 15:15:36 +0000 (15:15 +0000)]
Add -V as short form of --virtualsize in lvcreate.

13 years agoCompiler warning fixes, better error messaging, and cosmetic changes.
Jonathan Earl Brassow [Sat, 13 Aug 2011 04:28:34 +0000 (04:28 +0000)]
Compiler warning fixes, better error messaging, and cosmetic changes.

1) add new function 'raid_remove_top_layer' which will be useful
to other conversion functions later (also cleans up code)
2) Add error messages if raid_[extract|add]_images fails
3) Add function prototypes to prevent compiler warnings when
compiling with '--with-raid=shared'

13 years agomakefile fixes
Alasdair Kergon [Fri, 12 Aug 2011 13:03:35 +0000 (13:03 +0000)]
makefile fixes

13 years agocore removed with clean not distclean
Alasdair Kergon [Fri, 12 Aug 2011 12:56:38 +0000 (12:56 +0000)]
core removed with clean not distclean

13 years agoDo not remove makefile during "make clean".
Milan Broz [Fri, 12 Aug 2011 07:57:24 +0000 (07:57 +0000)]
Do not remove makefile during "make clean".

13 years agopost-release
Alasdair Kergon [Fri, 12 Aug 2011 02:34:08 +0000 (02:34 +0000)]
post-release

13 years agomore pre-release fixes old-v2_02_87 v2_02_87
Alasdair Kergon [Fri, 12 Aug 2011 02:16:46 +0000 (02:16 +0000)]
more pre-release fixes

13 years agoDrop CCS* variables no longer used.
Alasdair Kergon [Fri, 12 Aug 2011 01:52:16 +0000 (01:52 +0000)]
Drop CCS* variables no longer used.

13 years agopre-release
Alasdair Kergon [Fri, 12 Aug 2011 01:34:11 +0000 (01:34 +0000)]
pre-release

13 years agoVarious code clean-ups (s/malloc/zalloc/, new msgs, etc)
Jonathan Earl Brassow [Thu, 11 Aug 2011 21:32:18 +0000 (21:32 +0000)]
Various code clean-ups (s/malloc/zalloc/, new msgs, etc)

Fix a couple more issues that kabi found.
- Add some error messages in failure cases
- s/malloc/zalloc/
- use vg->vgmem for lv names instead of vg->cmd->mem

13 years agoFix memleak of geometry buffer
Zdenek Kabelac [Thu, 11 Aug 2011 20:49:33 +0000 (20:49 +0000)]
Fix memleak of geometry buffer

Looks like this function is not used too often - thus leak was discovered
by static analyzis (Coverity).

13 years agoAdd missing checks for function return codes.
Jonathan Earl Brassow [Thu, 11 Aug 2011 19:38:00 +0000 (19:38 +0000)]
Add missing checks for function return codes.

Some functions were being called without having their return values checked.

13 years agoTrivial, add void to ignore dm_snprinf result
Zdenek Kabelac [Thu, 11 Aug 2011 19:21:42 +0000 (19:21 +0000)]
Trivial, add void to ignore dm_snprinf result

13 years agopre-release fixes incl make distclean and configure --with-raid=none/shared
Alasdair Kergon [Thu, 11 Aug 2011 19:18:17 +0000 (19:18 +0000)]
pre-release fixes incl make distclean and configure --with-raid=none/shared

13 years agoAdd some log_error msg's and fix potential segfault
Jonathan Earl Brassow [Thu, 11 Aug 2011 19:17:10 +0000 (19:17 +0000)]
Add some log_error msg's and fix potential segfault

Thanks to kabi for spotting these - especially the possibility for
segfault if a loop runs all the way through without finding a match.

13 years agoAdd ability to down-convert RAID1 arrays.
Jonathan Earl Brassow [Thu, 11 Aug 2011 18:24:40 +0000 (18:24 +0000)]
Add ability to down-convert RAID1 arrays.

Also, add some simple RAID tests to testsuite.

13 years agoUpdate udev rules to skip DM flags decoding for removed devices
Zdenek Kabelac [Thu, 11 Aug 2011 17:55:29 +0000 (17:55 +0000)]
Update udev rules to skip DM flags decoding for removed devices

Skip decoding of DM flags when device is removed.

We currently need DM flags only for add|change events. So forking
dmsetup process for removed devices is a waste of CPU time.

Udev is already quite slow, so make it just a tiny bit faster.

13 years agoAdd detect_internal_vg_cache_corruption to lvm.conf
Zdenek Kabelac [Thu, 11 Aug 2011 17:46:13 +0000 (17:46 +0000)]
Add detect_internal_vg_cache_corruption to lvm.conf

Add config option to enable crc checking of VG structures.
Currently it's disabled by default.

For the internal test-suite this check it is enabled.

Note: In the case the internal error is detected, debug build with
compile option DEBUG_ENFORCE_POOL_LOCKING helps to catch the source
of the problem.

13 years agoLock memory for shared VG
Zdenek Kabelac [Thu, 11 Aug 2011 17:34:30 +0000 (17:34 +0000)]
Lock memory for shared VG

Use debug pool locking functionality. So the command could check,
whether the memory in the pool has not been modified.

For lv_postoder() instead of unlocking and locking for every changed
struct status member do it once when entering and leaving function.
(mprotect would trap each such memory access).
Currently lv_postoder() does not modify other part of vg structure
then status flags of each LV with flags that are reverted back to
its original state after function exit.

13 years agoAdd memory pool locking functions
Zdenek Kabelac [Thu, 11 Aug 2011 17:29:04 +0000 (17:29 +0000)]
Add memory pool locking functions

Adding debuging functionality to lock and unlock memory pool.

2 ways to debug code:
crc - is default checksum/hash of the locked pool.
      It gets slower when the pool is larger - so the check is only
      made when VG is finaly released and it has been used more then
      once.Thus the result is rather informative.

mprotect - quite fast all the time - but requires more memory and
           currently it is using posix_memalign() - this could be
   later modified to use dm_malloc() and align internally.
           Tool segfaults when locked memory is modified and core
   could be examined for faulty code section (backtrace).

Only fast memory pools could use mprotect for now -
so such debug builds cannot be combined with DEBUG_POOL.

13 years agoCache and share generated VG structs
Zdenek Kabelac [Thu, 11 Aug 2011 17:24:23 +0000 (17:24 +0000)]
Cache and share generated VG structs

Extend vginfo cache with cached VG structure. So if the same metadata
are use, skip mda decoding in the case, the same data are in use.
This helps for operations like activation of all LVs in one VG,
where same data were decoded giving the same output result.

Patch adds 1-to-1 connection between volume_group and lvmcache_vginfo.

13 years agoRemove dev name prefix from dmsetup line output if major and minor is used.
Milan Broz [Thu, 11 Aug 2011 17:06:24 +0000 (17:06 +0000)]
Remove dev name prefix from dmsetup line output if major and minor is used.

13 years agoFix possible format instance memory leaks and premature releases in _vg_read.
Peter Rajnoha [Thu, 11 Aug 2011 16:31:40 +0000 (16:31 +0000)]
Fix possible format instance memory leaks and premature releases in _vg_read.

13 years agoSuppress locking error messages in monitoring init scripts.
Peter Rajnoha [Thu, 11 Aug 2011 15:27:46 +0000 (15:27 +0000)]
Suppress locking error messages in monitoring init scripts.

13 years agoNeed 'ifdef' checks around RAID monitoring functions as well to catch the
Jonathan Earl Brassow [Thu, 11 Aug 2011 14:00:58 +0000 (14:00 +0000)]
Need 'ifdef' checks around RAID monitoring functions as well to catch the
case where the user does not want dmeventd support compiled in.

13 years agoFix build of raid without dmeventd.
Milan Broz [Thu, 11 Aug 2011 13:30:36 +0000 (13:30 +0000)]
Fix build of raid without dmeventd.

13 years agoNever ever use uninitialised descriptors if pipe() fails
Milan Broz [Thu, 11 Aug 2011 12:57:10 +0000 (12:57 +0000)]
Never ever use uninitialised descriptors if pipe() fails
(because of maximum open count fd exceeded or so).

Better return busy message, so even clients fail in more controlled way.

Without patch,  clvmd crashes with various strange backtraces
if under heavy load of connection requests.

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

(It still can OOM but that's different issue.)

13 years agoAdd dmeventd monitoring for RAID devices.
Jonathan Earl Brassow [Thu, 11 Aug 2011 05:00:20 +0000 (05:00 +0000)]
Add dmeventd monitoring for RAID devices.

13 years agoAdd RAID metadata devices to considered devices in _add_lv_to_dtree.
Jonathan Earl Brassow [Thu, 11 Aug 2011 04:18:17 +0000 (04:18 +0000)]
Add RAID metadata devices to considered devices in _add_lv_to_dtree.

_add_lv_to_dtree must also add RAID metadata devices.

13 years agoFix renaming of RAID logical volumes.
Jonathan Earl Brassow [Thu, 11 Aug 2011 03:29:51 +0000 (03:29 +0000)]
Fix renaming of RAID logical volumes.

The function 'for_each_sub_lv', which rename uses, was not handling the
RAID metadata areas.  Thus, the metadata LVs were not being renamed.

13 years agoJust add new lines between header comment
Zdenek Kabelac [Wed, 10 Aug 2011 20:26:41 +0000 (20:26 +0000)]
Just add new lines between header comment

13 years agoReplace free_vg with release_vg
Zdenek Kabelac [Wed, 10 Aug 2011 20:25:29 +0000 (20:25 +0000)]
Replace free_vg with release_vg

Move the free_vg() to  vg.c  and replace free_vg  with release_vg
and make the _free_vg internal.

Patch is needed for sharing VG in vginfo cache so the release_vg function name
is a better fit here.

13 years agoRemove INCONSISTENT_VG flag
Zdenek Kabelac [Wed, 10 Aug 2011 20:17:33 +0000 (20:17 +0000)]
Remove INCONSISTENT_VG flag

As this flag could not have been set by the current code - removing it.

Note: because of the wrong code logic this call:

lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED &
   (inconsistent ? INCONSISTENT_VG : 0));

had always passed '0' - now after flag removal it's passing
PRECOMMITTED flag in - this present functinal change in this patch.

To match the original functionality - 0 had to be always passed.
More testing is needed here.

13 years agoFix compiler warning.
Jonathan Earl Brassow [Wed, 10 Aug 2011 16:44:17 +0000 (16:44 +0000)]
Fix compiler warning.

Compiler complaining that meta_lv could be used uninitialized.  (Not true
because it is protected by 'clear_metadata'.)  I switched to using 'lv->vg',
as it makes no difference to vg_[write|commit].

13 years agoIf anything bad happens and unlocking fails
Milan Broz [Wed, 10 Aug 2011 16:07:53 +0000 (16:07 +0000)]
If anything bad happens and unlocking fails
(here clvmd crashed in the middle of operation),
lock is not removed from cache - here is one example:

locking/cluster_locking.c:497       Locking VG V_vg_test UN (VG) (0x6)
locking/cluster_locking.c:113   Error writing data to clvmd: Broken pipe
locking/locking.c:399         <backtrace>
locking/locking.c:461         <backtrace>
  Internal error: Volume Group vg_test was not unlocked

Code should always remove lock info from lvmcache and update counters
on unlock, even if unlock fails.

13 years agoInitialise clvmd locks before lvm context to avoid open descriptor leaks.
Milan Broz [Wed, 10 Aug 2011 11:00:32 +0000 (11:00 +0000)]
Initialise clvmd locks before lvm context to avoid open descriptor leaks.

(At least /dev/mapper/control is open after lvm context init.)

13 years agoautoreconf
Alasdair Kergon [Tue, 9 Aug 2011 18:14:48 +0000 (18:14 +0000)]
autoreconf

13 years agoRemove obsoleted GULM clvmd cluster locking support.
Milan Broz [Tue, 9 Aug 2011 18:11:00 +0000 (18:11 +0000)]
Remove obsoleted GULM clvmd cluster locking support.

13 years agoRemove support for the original dm ioctl interface version 1.
Alasdair Kergon [Tue, 9 Aug 2011 17:56:47 +0000 (17:56 +0000)]
Remove support for the original dm ioctl interface version 1.
Leave the basic support for multiple versions in case we have a new version
in future.

13 years agoSuppress low-level locking errors and warnings while using --sysinit.
Peter Rajnoha [Tue, 9 Aug 2011 11:44:57 +0000 (11:44 +0000)]
Suppress low-level locking errors and warnings while using --sysinit.

Today, we use "suppress_messages" flag (set internally in init_locking fn based
on 'ignorelockingfailure() && getenv("LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES")'.
This way, we can suppress high level messages like "File-based locking
initialisation failed" or "Internal cluster locking initialisation failed".

However, each locking has its own sequence of initialization steps and these
could log some errors as well. It's quite misleading for the user to see such
errors and warnings if the "--sysinit" is used (and so the ignorelockingfailure
&& LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable). Errors and
warnings from these intermediary steps should be suppressed as well if requested.

This patch propagates the "suppress_messages" flag deeper into locking init
functions. I've also added these flags for other locking types for consistency,
though it's not actually used for no_locking and readonly_locking.

13 years agoRemove unused 'origin' variable in lv_remove_single function.
Peter Rajnoha [Fri, 5 Aug 2011 09:21:13 +0000 (09:21 +0000)]
Remove unused 'origin' variable in lv_remove_single function.

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