1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

8208 Commits

Author SHA1 Message Date
Zdenek Kabelac
c697f501c7 Makefile: fix build in non src dir
Fix 'make install' from builddir != srcdir.
2013-11-19 10:55:11 +01:00
Petr Rockai
3a6f91d713 metadata: Make the fid mda routines a little more resilient. 2013-11-18 18:00:49 +01:00
Petr Rockai
03d3e1d9c1 lvmetad: Set up device pointers in synthetic lvmcache_infos. 2013-11-18 17:53:45 +01:00
Petr Rockai
b8a6b8f467 test: Force label-based reporting in pv-duplicate.sh. 2013-11-18 17:53:06 +01:00
Petr Rockai
ae337d472e report: Print UUIDs for missing PVs when possible. 2013-11-17 22:36:13 +01:00
Petr Rockai
ecc296311f metadata: Do not throw an error in pv_label for missing PVs. 2013-11-17 22:35:16 +01:00
Petr Rockai
a5bb1b48ee dev-cache.c: Make dev_name a little more robust. 2013-11-17 22:34:56 +01:00
Petr Rockai
71b6565529 report: Convert pv_mda_size to a type "label" field. 2013-11-17 21:43:06 +01:00
Petr Rockai
14ffc9d4df reporter: Adapt pvseg reporting to label-type fields. 2013-11-17 21:43:06 +01:00
Petr Rockai
2294282184 reporter: Deal correctly with dummy PVs/labels. 2013-11-17 21:43:06 +01:00
Petr Rockai
d5095222fa toollib: Report errors on non-PV arguments to process_each_label. 2013-11-17 21:43:06 +01:00
Petr Rockai
67c563ac2b pv_label: NULL result is not always an internal error. 2013-11-17 21:43:06 +01:00
Petr Rockai
a8aa8d4b5c report: Make PV UUID into a "label" type field. 2013-11-17 21:43:06 +01:00
Petr Rockai
67a7b7a87d report: Iterate over labels instead of PVs for label-only reports. 2013-11-17 21:43:06 +01:00
Petr Rockai
99214c51eb report: Make PMdaFree into a "label" field. 2013-11-17 21:43:06 +01:00
Petr Rockai
b07fb3a641 report: Adapt _pvfmt_disp to label-based reporting. 2013-11-17 21:43:04 +01:00
Petr Rockai
7e33f50cea report: Add a proper "label" field type. 2013-11-17 21:41:27 +01:00
Petr Rockai
6b41e916ff report: Make dev_size and dev_name columns' type "label". 2013-11-17 21:41:27 +01:00
Petr Rockai
cc633c84cf label: Track a device pointer in struct label. 2013-11-17 21:41:27 +01:00
Petr Rockai
dc3a071145 metadata: Add a pv_label accessor (go from a PV to its label). 2013-11-17 21:41:27 +01:00
Petr Rockai
a2034e9a99 metadata: Add lvmcache_info_mda_free as a companion to pv_mda_free. 2013-11-17 21:41:27 +01:00
Petr Rockai
1ef2c3c4ee toollib: Implement process_each_label. 2013-11-17 21:41:27 +01:00
Petr Rockai
9b91977f4e 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.
2013-11-17 21:41:27 +01:00
Petr Rockai
bead8ef5f0 metadata: Nuke the exported "pv_read" function. 2013-11-17 21:41:27 +01:00
Petr Rockai
ba6d6f0028 metadata: Fix handling of orphan PV linking & re-linking. 2013-11-17 21:41:27 +01:00
Petr Rockai
651d5093ed metadata: Avoid pv_read in find_pv_by_name. 2013-11-17 21:41:27 +01:00
Petr Rockai
2f5c12e3a8 pvremove: Avoid using pv_read in favour of scanning. 2013-11-17 21:41:27 +01:00
Petr Rockai
fc02f24178 test: Fix fallout from pv_read changes. 2013-11-17 21:41:27 +01:00
Petr Rockai
603b45e0ed pvresize: Do not use pv_read (get the PV from orphan VG). 2013-11-17 21:41:27 +01:00
Petr Rockai
0a59305c44 test: Add a test for the failing pv_read optimisation. 2013-11-17 21:41:26 +01:00
Petr Rockai
7e685e6c70 toollib: Drop the pv_read optimisation.
Only reading a single PV works correctly only in very limited circumstances.
Moreover, we can't rely on the MDA available on the PV either, since it may be
out of date in some circumstances (until now, we believed that PVs that have an
empty MDA are always orphans, but this is not 100% reliable either).
2013-11-17 21:41:26 +01:00
Petr Rockai
e1a63905d1 metadata: Do not try to check vg_name of a NULL PV. 2013-11-17 21:41:26 +01:00
Zdenek Kabelac
803f8ca714 tests: used -n for fsck 2013-11-15 12:38:37 +01:00
Zdenek Kabelac
3716e95354 tests: indent 2013-11-15 12:38:37 +01:00
Zdenek Kabelac
89a8c7bea6 cleanup: share the nonremoval message
Use common goto label for not remove log error.
2013-11-15 12:38:37 +01:00
Zdenek Kabelac
3cb9041764 cleanup: do not pass uninitialized space to selinux.
Just like with dm_prepare_selinux_context rather initialize to NULL.
2013-11-15 12:38:37 +01:00
Zdenek Kabelac
eb4b03768f libdm: catch wrongly reported values
Add internal error warning when string value is used
as sort value for numerical field.

Using log_warn since the function itself does not return error,
so we do not confuse log_error() checker.
2013-11-15 12:38:37 +01:00
Zdenek Kabelac
37b7c67079 thin: report thin device id
Support   lvs -o+thin_id  to report thin device id.
This device_id is connection between kernel and lvm2 user space thin
metadata.
2013-11-15 12:38:37 +01:00
Zdenek Kabelac
6ca832ceaf report: use _field_set_percent
Use common routine for displaying percentage.
2013-11-15 11:05:03 +01:00
Zdenek Kabelac
36d7c639d1 report: fix dereference of string as uint64_t
Fix buggy usage of "" (empty string) as a numerical string
value used for sorting.

On intel 64b platform this was typically resolve
as 0xffffff0000000000 - which is already 'close' to
UINT64_MAX which is used for _minusone64.

On other platforms it might have been giving
different numbers depends on aligment of strings.

Use proper &_minusone64 for sorting value when the reported
value is NUM.

Note: each numerical value needs to be thought about if it needs
default value &_zero64 or &_minusone64 since for cases, were
value of zero is valid, sorting should not be mixing entries
together.
2013-11-15 11:05:02 +01:00
Zdenek Kabelac
9eb81b1bf7 report: using _field_set_value
Simple conversion to use _field_set_value() and shorteing
the code.
2013-11-15 11:05:02 +01:00
Zdenek Kabelac
49ccf44f45 report: add wrappers to set values and percents
Add wrapper function for dm_report_field_set_value() which returns void
and return 1, so the code could be shorter.

Add wrapper function for percent display _field_set_percent().
2013-11-15 11:05:00 +01:00
Alasdair G Kergon
322e7b3060 post-release 2013-11-13 14:11:11 +00:00
Alasdair G Kergon
77a1efeb8e release 2.02.104
87 files changed, 1207 insertions(+), 294 deletions(-)
2013-11-13 14:02:34 +00:00
Alasdair G Kergon
527db4645f gcc: replace #ifdef linux with __linux__ 2013-11-13 13:56:29 +00:00
Peter Rajnoha
d8085edf65 pvscan: retry VG refresh before autoactivation if it fails
There's a tiny race when suspending the device which is part
of the refresh because when suspend ioctl is performed, the
dm kernel driver executes (do_suspend and dm_suspend kernel fn):

  step 1: a check whether the dev is already suspended and
          if yes it returns success immediately as there's
          nothing to do
  step 2: it grabs the suspend lock
  step 3: another check whether the dev is already suspended
          and if found suspended, it exits with -EINVAL now

The race can occur in between step 1 and step 2. To prevent
premature autoactivation failure, we're using a simple retry
logic here before we fail completely. For a complete solution,
we need to fix the locking so there's no possibility for suspend
calls to interleave each other to cause this kind of race.

This is just a workaround. Remove it and replace it with proper
locking once we have that in!
2013-11-12 11:09:45 +01:00
Jonathan Brassow
7de533ad12 mirror: Handle failures in tmp mirror used when up-converting.
Failures in the temporary mirror used when up-converting cause dmeventd
to issue 'lvconvert --repair' on the sub-LV, <lv_name>_mimagetmp_?.  The
'lvconvert' command refuses to deal with this sub-LV outright - it
expects to be given the name of the top-level LV.  So, just like we do
with mirrored logs, we strip-off the portion of the name that is not
the top-level LV and issue the command on the top-level LV instead.
2013-11-08 09:52:00 -06:00
Peter Rajnoha
b6b5299d1e corosync: fix some gcc warnings
warning: function declaration isn't a prototype [-Wstrict-prototypes]
warning: old-style function definition [-Wold-style-definition]
2013-11-06 14:55:18 +01:00
Peter Rajnoha
fc144a3fc5 profile: add thin_pool_chunk_size_policy to default.profile
By default, thin_pool_chunk_size_policy is set to "generic".
2013-11-06 13:29:25 +01:00
Zdenek Kabelac
14b852609b tests: testing thin lvchange
Test various thin change operation,
including activation logic - which is somewhat
limited with singlenode emulation.

More tests needs to be added.
2013-11-01 13:05:05 +01:00