1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

5582 Commits

Author SHA1 Message Date
Alasdair Kergon
0b70507434 Add and use dev_open_readonly and variations. 2011-05-24 13:36:57 +00:00
Petr Rockai
ba7d33be9c Mention code layout in lvmetad DESIGN. 2011-05-23 14:46:48 +00:00
Zdenek Kabelac
5ec549ca5a Do not log a superfluous stack message when the lv is properly processed 2011-05-19 13:59:22 +00:00
Petr Rockai
dc85d3fb57 More work on the common daemon framework. Make things compile, too. 2011-05-15 11:02:29 +00:00
Petr Rockai
73ffd6e748 More scavenging of common daemon code, this time the clvmd local socket setup
sequence.
2011-05-13 09:34:12 +00:00
Petr Rockai
d7448a721b Start filling in some of the common daemon (server-side) functionality, taking
dmeventd code as a starting point.
2011-05-13 08:45:46 +00:00
Petr Rockai
04507b0ace First go at the lvmetad client-side interface. 2011-05-13 08:17:26 +00:00
Petr Rockai
56517bad21 First stab at the prototypes of the daemon-common functionality (to be
eventually shared by dmeventd, lvmetad and clvmd).
2011-05-13 08:07:28 +00:00
Petr Rockai
f03e3ac15b Initial design document for LVMetaD, building on the draft from June of last
year, incorporating the outcomes of today's and yesterday's discussions.
2011-05-12 17:49:46 +00:00
Peter Rajnoha
5fb0c20297 Do not issue an error message when unable to remove .cache on read-only fs. 2011-05-12 12:42:47 +00:00
Petr Rockai
8dad498967 Update WHATS_NEW. 2011-05-07 15:52:50 +00:00
Petr Rockai
ed6ff5d2b3 Rewrite vgreduce --removemissing --force, using existing primitives:
lv_remove_with_dependencies and mirror_remove_missing (the latter coming from
lvconvert). Remove substantial amount of legacy code.
2011-05-07 15:52:16 +00:00
Petr Rockai
b00711e312 Add a new entry point in the mirror lvconvert code, for removing missing mirror
images and/or logs, without attempting any further actions.
2011-05-07 13:56:13 +00:00
Petr Rockai
eee66d2a80 When glibc needs buffers for line buffering of input and output buffers, it
allocates these buffers in such way it adds memory page for each such buffer
and size of unlock memory check will mismatch by 1 or 2 pages.

This happens when we print or read lines without '\n' so these buffers are
used. To avoid this extra allocation, use setvbuf to set these bufffers ahead.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Milan Broz <mbroz@redhat.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2011-05-07 13:50:11 +00:00
Petr Rockai
833a287337 Make vg_mark_partial_lvs also clear existing PARTIAL_LV flags, so it can be
issued repeatedly on the same VG, keeping the PARTIAL_LV flags up to date.
2011-05-07 13:32:05 +00:00
Alasdair Kergon
5510b4e7d7 test update without WHATS_NEW to check it gives warning now 2011-04-29 19:06:17 +00:00
Alasdair Kergon
20ffd91347 test 2011-04-29 19:05:11 +00:00
Alasdair Kergon
e93eb11d92 test 2011-04-29 19:01:59 +00:00
Alasdair Kergon
76b09bb328 test 2011-04-29 19:01:59 +00:00
Alasdair Kergon
213e1a2113 test 2011-04-29 18:57:09 +00:00
Alasdair Kergon
3fcaa826f4 test 2011-04-29 18:56:35 +00:00
Alasdair Kergon
ce562b276f test 2011-04-29 18:48:50 +00:00
Alasdair Kergon
16a0f230b9 test 2011-04-29 18:43:31 +00:00
Alasdair Kergon
9cca916815 test 2011-04-29 18:41:46 +00:00
Alasdair Kergon
acb1e1d355 test 2011-04-29 18:40:55 +00:00
Alasdair Kergon
254dafcfab test 2011-04-29 18:40:14 +00:00
Alasdair Kergon
a086d55ba8 post-release 2011-04-29 17:05:20 +00:00
Alasdair Kergon
b3886cb12f wake buildbot 2011-04-29 16:27:09 +00:00
Alasdair Kergon
4cda44bfb9 commands/toolcontext.c:578: warning: ‘udev_dir’ may be used uninitialized in this function
commands/toolcontext.c:576: warning: ‘udev_dir_len’ may be used uninitialized in this function

Bogus - suppress them.
2011-04-29 16:23:39 +00:00
Alasdair Kergon
c0a1ec237f pre-release 2011-04-29 16:12:21 +00:00
Alasdair Kergon
919ab56b6d pre-release clean-ups 2011-04-29 00:21:13 +00:00
Zdenek Kabelac
9ecab00d26 Add missing cleanup for vgimportclone script 2011-04-28 22:17:06 +00:00
Alasdair Kergon
9cda028a96 clean up critical section patch 2011-04-28 20:29:59 +00:00
Zdenek Kabelac
96c4abee62 Missing space in debug message 2011-04-28 19:59:17 +00:00
Alasdair Kergon
2c56f60db4 Set pv_min_size to 2048KB to exclude floppy drives.
Previously was 512.
2011-04-28 17:33:34 +00:00
Alasdair Kergon
86ba564a9e Add missing pkg_config_init check with --enable-udev_sync. 2011-04-28 16:54:32 +00:00
Alasdair Kergon
900a267655 Adjust pvmove man page wording.
Add missing --alloc anywhere to example and mention that snapshots and
mirrors can't be moved.
2011-04-28 16:22:47 +00:00
Peter Rajnoha
c52a2a4e91 Uncomment obtain_device_list_from_udev setting in lvm.conf.
Just for consistency with other settings we already have in lvm.conf.
2011-04-26 09:09:24 +00:00
Peter Rajnoha
d93275eb0d autoreconf 2011-04-22 12:13:05 +00:00
Peter Rajnoha
a1bf82a2df Use common udev_get_dev_dir() to get current device directory managed by udev. 2011-04-22 12:07:35 +00:00
Peter Rajnoha
edcda01a1e Obtain device list from udev by default if LVM2 is compiled with udev support.
Also, add a new 'obtain_device_list_from_udev' setting to lvm.conf with which
we can turn this feature on or off if needed.

If set, the cache of block device nodes with all associated symlinks
will be constructed out of the existing udev database content.
This avoids using and opening any inapplicable non-block devices or
subdirectories found in the device directory. This setting is applied
to udev-managed device directory only, other directories will be scanned
fully. LVM2 needs to be compiled with udev support for this setting to
take effect. N.B. Any device node or symlink not managed by udev in
udev directory will be ignored with this setting on.
2011-04-22 12:05:32 +00:00
Peter Rajnoha
40059f18d9 Move common libudev code to lvm-wrappers.[ch].
...so we can use it throughout.
2011-04-22 11:59:59 +00:00
Peter Rajnoha
71b29ddcc4 Require libudev >= 143 when compiling with udev support.
Old versions of libudev < 143 were experimental and unstable. Require recent
and stable versions only (version 143 is old enough anyway).
2011-04-22 11:56:41 +00:00
Dave Wysochanski
a1e22157d3 Disable nightly test for vgimportclone until proper fix is made.
This fails on lenny buildslave for some reason.
For now disable the vgimportclone part of the test until proper fix.

Let the first part of the test still run though, which shows pvs working
with duplicate pvs.
2011-04-21 19:06:00 +00:00
Dave Wysochanski
954dc4e8a6 Add vgimportclone symlink for nightly test. 2011-04-21 17:42:58 +00:00
Dave Wysochanski
1af48ed7c6 Add nightly test for vgimportclone and querying of vgnames with duplicate pvs.
Related to rhbz 697959.

This test fails prior to these two commits:
commit af112eb2c9
Author: Zdenek Kabelac <zkabelac@redhat.com>
Date:   Thu Apr 21 13:15:26 2011 +0000

    Skip check for NULL before dm_free

    dm_free makes this test itself.

commit 91419c3e86
Author: Zdenek Kabelac <zkabelac@redhat.com>
Date:   Thu Apr 21 13:13:40 2011 +0000

    Fix use of released vgname and vgid
2011-04-21 17:03:38 +00:00
Zdenek Kabelac
5c246f4876 Skip check for NULL before dm_free
dm_free makes this test itself.
2011-04-21 13:15:26 +00:00
Zdenek Kabelac
b680d5bf7b Fix use of released vgname and vgid
Avoid using of already released memory when duplicated MDA is found.

As get_pv_from_vg_by_id() may call lvmcache_label_scan() use the local copy
of the vgname and vgid on the stack as vginfo may dissapear and code was
then accessing garbage in memory.

i.e.  pvs  /dev/loop0
(when /dev/loop0 and /dev/loop1 has same MDA content)

Invalid read of size 1
   at 0x523C986: dm_hash_lookup (hash.c:325)
   by 0x440C8C: vginfo_from_vgname (lvmcache.c:399)
   by 0x4605C0: _create_vg_text_instance (format-text.c:1882)
   by 0x46140D: _text_create_text_instance (format-text.c:2243)
   by 0x47EB49: _vg_read (metadata.c:2887)
   by 0x47FBD8: vg_read_internal (metadata.c:3231)
   by 0x477594: get_pv_from_vg_by_id (metadata.c:344)
   by 0x45F07A: _get_pv_if_in_vg (format-text.c:1400)
   by 0x45F0B9: _populate_pv_fields (format-text.c:1414)
   by 0x45F40F: _text_pv_read (format-text.c:1493)
   by 0x480431: _pv_read (metadata.c:3500)
   by 0x4802B2: pv_read (metadata.c:3462)
 Address 0x652ab80 is 0 bytes inside a block of size 4 free'd
   at 0x4C2756E: free (vg_replace_malloc.c:366)
   by 0x442277: _free_vginfo (lvmcache.c:963)
   by 0x44235E: _drop_vginfo (lvmcache.c:992)
   by 0x442B23: _lvmcache_update_vgname (lvmcache.c:1165)
   by 0x443449: lvmcache_update_vgname_and_id (lvmcache.c:1358)
   by 0x443C07: lvmcache_add (lvmcache.c:1492)
   by 0x46588C: _text_read (text_label.c:271)
   by 0x466A65: label_read (label.c:289)
   by 0x4413FC: lvmcache_label_scan (lvmcache.c:635)
   by 0x4605AD: _create_vg_text_instance (format-text.c:1881)
   by 0x46140D: _text_create_text_instance (format-text.c:2243)
   by 0x47EB49: _vg_read (metadata.c:2887)

Add testing script
2011-04-21 13:13:40 +00:00
Petr Rockai
cf83eac6fe Always copy all tests to builddir regardless of T/S, since subsequent runs
(possibly with different T or S) skip that step.
2011-04-19 15:28:17 +00:00
Mike Snitzer
ffcb1b9c2c Improve the discard documentation. Also improve discard code in
pv_manip.c to properly account for case when pe_start=0 and the first
physical extent is to be released (currently skip the first extent to
avoid discarding the PV label).
2011-04-13 18:26:39 +00:00