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

4192 Commits

Author SHA1 Message Date
Alasdair Kergon
d61f611adc Look up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat.
Make find_pv_in_vg_by_uuid() return same type as related functions.
2010-03-16 15:30:48 +00:00
Alasdair Kergon
b19719801b Introduce is_missing_pv(). 2010-03-16 14:37:38 +00:00
Milan Broz
83a2bc8ec4 Fix clvmd Makefile to not overwrite LIBS from template definition 2010-03-16 08:47:46 +00:00
Alasdair Kergon
aab6f07d14 post-release 2010-03-09 14:01:47 +00:00
Alasdair Kergon
db8748cefd pre-release cleanups 2010-03-09 13:42:28 +00:00
Alasdair Kergon
23b3f55bfb pre-release 2010-03-09 13:13:07 +00:00
Alasdair Kergon
e6573a9bed some missing debug messages 2010-03-09 12:31:51 +00:00
Zdenek Kabelac
d6a19426c7 Update comments for selecting maps
Use dm_snprintf and check result whether we create correct /proc path name
2010-03-09 10:25:50 +00:00
Alasdair Kergon
9426d45cde . 2010-03-09 03:20:12 +00:00
Alasdair Kergon
48d0cd3564 Misc cleanups in the new mlock code, incl. improving some variable names
& messages; using more statics (for now) to avoid redundant
recalculation; validating config file just once on loading; keeping maps
file open.
2010-03-09 03:16:11 +00:00
Zdenek Kabelac
89f61acf2c Use mlock() only on 'r' memory maps 2010-03-08 17:14:21 +00:00
Milan Broz
985d87b5eb Add --help dmsetup option as the synonym for help command. 2010-03-08 16:05:07 +00:00
Milan Broz
0be2dfefdb Add --showkeys parameter description into dmsetup man page.
Also fix minor warning (-c is parameter) in man page formatting.
2010-03-08 16:04:32 +00:00
Zdenek Kabelac
89f30d2df7 Unconditionaly ignore also Virtual Dynamically-linked Shared Object
(VDSO on 32bit is VSyscall on 64bit)
It seems it could be locked on 64bit kernels running 32bit binaries,
but it makes troubles on real 32bit machines where mlock() returns
error when trying to lock such map area. (0xffffe000)
Behavior of mlockall() seems to be similar.
2010-03-08 15:55:52 +00:00
Zdenek Kabelac
0b648ce87b Use '_' prefix for local static variable. 2010-03-05 15:14:03 +00:00
Zdenek Kabelac
0c897ecefd mlockall() -> mlock()
This patch adds a new implementation of locking function instead
of mlockall() that may lock way too much memory (>100MB).
New function instead uses mlock() system call and selectively locks
memory areas from /proc/self/maps trying to avoid locking areas
unused during lock-ed state.

Patch also adds struct cmd_context to all memlock() calls to have
access to configuration.

For backward compatibility functionality of mlockall()
is preserved with "activation/use_mlockall" flag.

As a simple check, locking and unlocking counts the amount of memory
and compares whether values are matching.
2010-03-05 14:48:33 +00:00
zkabelac
f2a6d937a6 Use UDEV_LIBS, and link -ludev only when needed. 2010-03-04 12:12:34 +00:00
zkabelac
76f4498303 Use DL_LIBS, remove -ldl from global LIBS and link -ldl only when needed. 2010-03-04 12:10:40 +00:00
zkabelac
5451f79f55 This patch add SELINUX_LIBS and STATIC_LIBS variables.
For static builds dependency for SELinux libs is not handled by 'ar'.
Till better solution is found, for static builds STATIC_LIBS is used.

Patch updates SELinux detection to use 3rd & 4th parameter for Success/Fail.
Also removes detection of pthread from this check as we know which
version of libdevmapper we are going to link with lvm after merge.

SELinux header check moved to the SELinux test code.
2010-03-04 12:08:26 +00:00
zkabelac
4e69ed9c98 Removes -rdynamic from linking of lvm.static and dmeventd.static. 2010-03-04 12:03:54 +00:00
zkabelac
75f55c758c Pthread linking change
Create new substituted variable PTHREAD_LIBS and link this library
only with tools/libs which really needs it - i.e. dmeventd.

Check for libpthread only for builds with clvmd or dmeventd.

Remove variable LIB_PTHREAD
2010-03-04 11:21:05 +00:00
zkabelac
f9d1b67e86 Readline linking update
Modify linking of readline library. Create new  substituted varible
READLINE_LIBS - readline library is linked ONLY with tools that really use
it - i.e. lvm. (Static lvm does not use readlin).
Previous behaviour put this library into the variable LIBS and thus
linked it with all created object files of lvm project (i.e. plugins...).

READLINE detection is simplified.

Termcap library is linked in only if readline library doesn't have its own
dependency (i.e. old distributions).
2010-03-04 11:19:15 +00:00
zkabelac
04ecf25522 Introduce LVMINTERNAL_LIBS
Keep dependency libraries for liblvm-internal in one place.
2010-03-04 11:12:39 +00:00
zkabelac
52b51b70eb As fsadm is installed by default - it's a common practice to rather
print help text in '--disable' form for such case.
2010-03-04 11:09:08 +00:00
zkabelac
3fdc1390fe This patch moves inclusion of the make.tmpl before DEFS modification,
so it goes in the same order on the compilation line.
(i.e. HAVE_CONFIG_H goes first)
2010-03-04 09:56:56 +00:00
zkabelac
f309bd12c7 Use consistently $() instead of ${} for all Makefile variables,
thought both usage forms are correct.
2010-03-04 09:56:01 +00:00
zkabelac
d388f94c7f Replace CFLOW_CMD only in make.tmpl and use it as variable elsewhere. 2010-03-04 09:53:08 +00:00
zkabelac
0f878a226d Use $(top_builddir) for inclusion of make.tmpl in Makefiles. 2010-03-04 09:51:37 +00:00
zkabelac
a38f899d7e Use datarootdir and fix warning during configure process:
config.status: WARNING:  'make.tmpl.in' seems to ignore the --datarootdir setting.
2010-03-04 09:48:19 +00:00
zkabelac
6c09d7b60c Usage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61. 2010-03-04 09:46:38 +00:00
Mike Snitzer
8cb8f65010 Handle a misaligned device that reports a -1 alignment_offset.
The kernel's blk_stack_limits() function may flag a device as
'misaligned'.  If it does the alignment_offset will be -1.

Update set_pe_align_offset() to accommodate this corner case.
2010-03-02 21:56:14 +00:00
Alasdair Kergon
49437d9a07 Extend core allocation code in preparation for mirrored log areas. 2010-03-01 20:00:20 +00:00
fabbione
69962eae7c - fix whitespaces all over (tabs/spaces)
- increase timeout to 30 secs (on Chrissie request)
- source both cluster and clvmd for options (like all the other cluster
  init scripts)
- add clustered_vgs and _lvs commodity fns
- move rh_status* fns at the top, so they can be reused
- heavily cleanup start and stop fns from redundant code and unnecessary
  loops
- improve output from different operations
- make the init script lsb compliant
- don´t force kill of the daemon, send only a TERM signal and then wait
for it to exit
- Resolves rhbz#533247
2010-02-26 13:07:43 +00:00
Milan Broz
c440f39874 Remove lvs_in_vg_activated_by_uuid_only call.
There is no difference from lvs_in_vg_activated now,
convert all users to this call.
2010-02-24 20:01:40 +00:00
Milan Broz
40090be220 Always query device by uuid only.
lvm2 devices have always UUID set even if imported from lvm1 metadata.

Patch removes name argument from dev_manager_info call and converts
all activation related calls to use query by UUID.

Also it simplifies mknode call (which is the only user on mknodes parameter).
2010-02-24 20:00:56 +00:00
Dave Wysochanski
281a92bf74 Update WHATS_NEW. 2010-02-24 18:21:15 +00:00
Dave Wysochanski
bbacb7fff0 Add Doxygen file for lvm2app to generate documentation from lvm2app.h.
A simple Doxygen file for lvm2app documentation.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:54 +00:00
Dave Wysochanski
cccdc3eea0 Update doxygen comments for lvm2app.h.
Fix add/remove tag function headers.
Fix a lot of little problems with doxygen comments.
Clarify the basic objects and their handles, and place functions with their
appropriate handles/objects.
All this cleanup moves automatic documentation of lvm2app much closer to being
useful as official documentation.  In the future I will add some examples
and plan to build the examples as part of the unit tests.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:44 +00:00
Dave Wysochanski
aa9c970f97 Update lvm2app interactive unit test for vg/lv tags.
Simple test of vg/lv tag addition/deletion.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:35 +00:00
Dave Wysochanski
4f81adb3c9 Add lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().
Add lvm2app functions to manage LV tags.
For lvm_lv_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:26 +00:00
Dave Wysochanski
b8f75d74ae Add lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Add lvm2app functions to manage VG tags.
For lvm_vg_get_tags(), we return a list of tags, similar to other
functions that return lists.  An empty list is returned if there
are no VG tags.  NULL is returned if there is a problem obtaining
the list of tags.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:18 +00:00
Dave Wysochanski
befffd65bf Add tag_list_copy() supporting function inside lvm2app.
Add a supporting function to copy a list of internal tags to lvm2app list.
We need to put this here because of the lvm_str_list_t type which we export
in lvm2app.h.  If we didn't export this type, we could put this in the
internal library and use struct str_list.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:16:10 +00:00
Dave Wysochanski
610cd1a531 Add dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
We need to allocate memory for the tag and copy the tag value before we
add it to the list of tags.  We could put this inside lvm2app since the
tools keep their memory around until vg_write/vg_commit is called, but
we put it inside the internal library to minimize code in lvm2app.
We need to copy the tag passed in by the caller to ensure the lifetime of
the memory until the {vg|lv} handle is released.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:57 +00:00
Dave Wysochanski
08d06030dc Refactor lvchange_tag() to call lv_change_tag() library function.
Similar refactoring to vgchange - pull out common parts and put into
library function for reuse.  Should be no functional change.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:49 +00:00
Dave Wysochanski
083687d0fd Refactor vgcreate to call new vg_change_tag() function.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:40 +00:00
Dave Wysochanski
f874581701 Refactor _vgchange_tag() to vg_change_tag() library function.
Pull out common code to be called from tools as well as lvm2app.
Leave archive() at tool level so we can use from vgcreate
as well as vgchange.  Should be no functional change.
- add stack macro in vgchange

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-24 18:15:05 +00:00
Petr Rockai
e66d76ac5a Add _mlog devices to dependency trees using UUID, not name, in activation. 2010-02-23 15:49:52 +00:00
Petr Rockai
5d7ad8ae75 Relax a check on blkid exit value, which seems to be different in different
versions. Fixes a spurious test failure introduced with -o pipefail.
2010-02-22 14:47:55 +00:00
Mike Snitzer
99ab428344 Do not reload origin again in lv_remove_single() if it had a merging
snapshot.  vg_remove_snapshot() will have already performed the required
reload.
2010-02-17 23:36:45 +00:00
Mike Snitzer
eaef92b02f Refactor snapshot-merge deptree and device removal to support info-by-uuid
Add a merging snapshot to the deptree, using the "error" target, rather
than avoid adding it entirely.  This allows proper cleanup of the -cow
device without having to rename the -cow to use the origin's name as a
prefix.

Move the preloading of the origin LV, after a merge, from
lv_remove_single() to vg_remove_snapshot().  Having vg_remove_snapshot()
preload the origin allows the -cow device to be released so that it can
be removed via deactivate_lv().  lv_remove_single()'s deactivate_lv()
reliably removes the -cow device because the associated snapshot LV,
that is to be removed when a snapshot-merge completes, is always added
to the deptree (and kernel -- via "error" target).

Now when the snapshot LV is removed both the -cow and -real devices
get removed using uuid rather than device name.  This paves the way
for us to switch over to info-by-uuid queries.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2010-02-17 22:59:46 +00:00