1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

5378 Commits

Author SHA1 Message Date
Milan Broz
9c2c45f192 Use 64bit unsigned value for maximum stripe size test.
While STRIPE_SIZE_LIMIT * 2 is basically UINT_MAX, 32bit integer
value can already overflow durin arg size parsing.

(This really happens in test where --stripesize 4294967291 is used,
in s390x uint overflow and this test is ineffective.)
2011-03-02 16:56:06 +00:00
Petr Rockai
fd30a1c96e Do not run past the end of an array in dmeventd's _handle_request when faced
with an unknown command ID.
2011-03-02 14:20:48 +00:00
Milan Broz
c537579e61 Fix test to use explicit /dev/mapper/ node, /proc/mounts should not change this...
(failed on RHEL5)
2011-03-02 13:49:29 +00:00
Petr Rockai
45ba9f9c2f As requested in BZ 454618:
- dmeventd -R will continue to start up even if no dmeventd is currently
  running + a test for this behaviour
- add -R to dmeventd manpage
2011-03-02 12:49:13 +00:00
Peter Rajnoha
67f411afc0 Use a copy if moving an mda from pv fid to vg fid.
We'll destroy the pv fid (with all mdas in it) after merging all pv mdas to
a vg in _text_pv_setup fn, hence we need to use a copy here!
2011-03-02 10:23:29 +00:00
Peter Rajnoha
38d96413d0 Make add_metadata_area_to_pv/remove_metadata_area_from_pv static.
No need to put these in format-text.h, it's not used anywhere else actually.
2011-03-02 10:19:14 +00:00
Zdenek Kabelac
7d5f270516 Indent case part properly 2011-03-02 08:41:55 +00:00
Zdenek Kabelac
5c9b44a61e Add missing return 2011-03-02 08:40:28 +00:00
Alasdair Kergon
fa61ff55de Accept multiple mapped device names on many dmsetup command lines. 2011-03-02 02:44:56 +00:00
Alasdair Kergon
9a45e3dbbb Fix dm_udev_wait calls in dmsetup to occur before readahead display not after.
Include an implicit dm_task_update_nodes() within dm_udev_wait().
2011-03-02 00:29:57 +00:00
Milan Broz
5993dc5b48 Rather return success if skipping udev wait. 2011-03-01 23:44:07 +00:00
Zdenek Kabelac
c9aeaebd1a Invert condition for READLINE check 2011-03-01 23:29:14 +00:00
Alasdair Kergon
c588dfbdfa Fix _create_and_load_v4 not to lose the --addnodeoncreate setting (1.02.62). 2011-03-01 23:27:06 +00:00
Zdenek Kabelac
bc7397105c Build test.c also without readline library
Allow bulding of this testing tool also without readline library.
Outputs message about build without readline library then.
2011-03-01 23:18:40 +00:00
Milan Broz
6795c361c1 Fix tests if udevadm missing (old udev). 2011-03-01 22:28:27 +00:00
Zdenek Kabelac
81957c524b Quick fix to compile lvm2api tests when possible
Do not build lvm2api tests when lvm2api lib is not enabled.
2011-03-01 21:30:43 +00:00
Milan Broz
070787d579 Fix some compile warnings on RHEL5
- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer
2011-03-01 20:17:56 +00:00
Milan Broz
75029c2d42 Rephrase backup message. 2011-02-28 20:50:01 +00:00
Zdenek Kabelac
dcb8c448d3 Fix void pointer arithmetic warning in pool debug code 2011-02-28 19:54:30 +00:00
Zdenek Kabelac
d55b658e6c Add fall through comments
Add comments to switch case construct.
2011-02-28 19:53:03 +00:00
Zdenek Kabelac
bb9b9c6514 Remove dead code
Remove code which is no longer used.
Code which has been using msg_malloced was removed in 2007.
2011-02-28 19:50:15 +00:00
Zdenek Kabelac
2163383728 Test result of dm_task_set_uuid 2011-02-28 19:47:22 +00:00
Zdenek Kabelac
23b5c9b9e5 Use backward compatible configuration for test
Currently the test are not properly working with new code.
Use settings for the previous behaviour.

FIXME: update tests to properly test new allocation policies.
2011-02-28 19:44:21 +00:00
Alasdair Kergon
179139735c mention vgreduce in pvremove man page 2011-02-28 19:40:04 +00:00
Alasdair Kergon
9938f0c674 Improve pvremove error message when PV belongs to a VG. 2011-02-28 19:35:09 +00:00
Peter Rajnoha
0de865f20b Add a hint for manual revert if there's an error in pv_write, vg_write, vg_commit for pvresize. 2011-02-28 17:08:09 +00:00
Peter Rajnoha
fc04cb0266 Use pv->vg_name directly instead of pv->vg->name in _text_pv_write.
This also prevents a possible segfault during an automatic repair
when the PV does not belong to a VG anymore and we call pv_write_orphan.
2011-02-28 17:05:48 +00:00
Peter Rajnoha
7f250ab142 Allow non-orphan PVs with two metadata areas to be resized.
We allow writing non-orphan PVs only for resize now. The "orphan PV" assert
in pv_write fn uses the "allow_non_orphan" parameter to control this assert.
However, we should find a more elaborate solution so we can remove this
restriction altogether (pv_write together with vg_write is not atomic, we
need to find a safe mechanism so there's an easy revert possible in case of
an error).
2011-02-28 13:19:02 +00:00
Alasdair Kergon
eb9b172ec0 Fix check for log-only allocation in new alloc normal loop. 2011-02-27 01:16:52 +00:00
Alasdair Kergon
a499caabfb Various changes to the allocation algorithms: Expect some fallout.
There is a lot to test.

Two new config settings added that are intended to make the code behave
closely to the way it did before - worth a try if you find problems.
2011-02-27 00:38:31 +00:00
Peter Rajnoha
c4dbd497b2 vgconvert is fixed now to work with the changes in metadata area handling - enable the tests.
Add a small fix that preserves pe_start for lvm1 PVs when being converted.

(this fix needs to be replaced with something more clever, but let's have this working now)
2011-02-25 14:12:14 +00:00
Peter Rajnoha
ed08b81e18 Allow only orphan PVs to be resized even with two metadata areas. 2011-02-25 14:08:54 +00:00
Peter Rajnoha
8a7a401cae Revert the patch for vgconvert to work with recent changes in metadata area handling.
This should work now with the help of the patch from previous commit.
2011-02-25 14:02:53 +00:00
Peter Rajnoha
cb38146acb Read PV metadata information from cache if pv_setup called with pv->fid == vg->fid.
If the PV is already part of the VG (so the pv->fid == vg->fid), it makes no
sense to attach the mdas information from PV to a VG. Instead, we read new
PV metadata information from cache and attach it to the VG fid.
2011-02-25 13:59:47 +00:00
Peter Rajnoha
1d96b805e1 Fix a bug in metadata location calculation, cleanup pv_add_metadata_area fn.
This bug (a missing line) caused the 2nd MDA area location to be calculated
incorrectly and it didn't fit the disk size properly.

(https://www.redhat.com/archives/lvm-devel/2011-February/msg00127.html)
2011-02-25 13:50:02 +00:00
Peter Rajnoha
65a3e6454b Remove a few size_t type warnings. 2011-02-22 10:01:11 +00:00
Mike Snitzer
96171b0c03 Add inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7). 2011-02-21 16:26:23 +00:00
Peter Rajnoha
4dd4e14fd8 %ld -> PRIu64 2011-02-21 13:09:27 +00:00
Peter Rajnoha
01a0facd7e WHATS_NEW 2011-02-21 12:40:46 +00:00
Peter Rajnoha
7ef77b52a8 Temporarily disable 'convert a VG from lvm2 to lvm1 format' test until a known issue is resolved.
Otherwise we get an error:

  PV segment VG free_count mismatch: 32 != 33
  PV segment VG extent_count mismatch: 32 != 33
2011-02-21 12:37:33 +00:00
Peter Rajnoha
249d85882f Fix metadata balance code to work with recent changes in metadata handling
interface (with the changes in format_instance).
2011-02-21 12:33:16 +00:00
Peter Rajnoha
5261cc0402 Add old_uuid field to struct physical_volume so we can still reference a PV
with its old UUID when we're changig it (the cache as well as metadata area
index has the old uuid that we need to use to access the information!)
2011-02-21 12:31:28 +00:00
Peter Rajnoha
5cbb49ed94 Fix vgconvert code to work with changes in metadata area handling and changes
in format_instance. Add new 'vg_convert' function.
2011-02-21 12:29:21 +00:00
Peter Rajnoha
c7c59e41cd Change pvresize code to work with new metadata handling interface and allow
resizing a PV with two metadata areas.
2011-02-21 12:27:26 +00:00
Peter Rajnoha
771b5db044 Change pv_write code to work with the changes in metadata handling interface
and changes in format_instance.
2011-02-21 12:26:27 +00:00
Peter Rajnoha
d0ffde9114 Remove unused _mda_setup fn. This functionality is covered by new pv_add_metadata_area fn. 2011-02-21 12:25:16 +00:00
Peter Rajnoha
12353bda0a Change the code throughout to use new pv_initialise and modified pv_setup fn.
Change pv_create code to work with these changes together with using new
pv_add_metadata_area fn to add metadata areas for a PV being created.
2011-02-21 12:24:15 +00:00
Peter Rajnoha
e1b1f2f961 Separate new pv_initialise function out of the original pv_setup code.
pv_initiliase initialises a new PV
pv_setup sets up an existing PV with a VG
2011-02-21 12:20:18 +00:00
Peter Rajnoha
d58036bc42 Add new pv_remove_metadata_area interface function. 2011-02-21 12:17:54 +00:00
Peter Rajnoha
83f5538979 Add new pv_add_metadata_area interface function. 2011-02-21 12:17:26 +00:00