]> sourceware.org Git - lvm2.git/log
lvm2.git
14 years agoAdd ability to create mirrored logs for mirror LVs.
Jonathan Earl Brassow [Fri, 26 Mar 2010 22:15:43 +0000 (22:15 +0000)]
Add ability to create mirrored logs for mirror LVs.

This check-in enables the 'mirrored' log type.  It can be specified
by using the '--mirrorlog' option as follows:
#> lvcreate -m1 --mirrorlog mirrored -L 5G -n lv vg

I've also included a couple updates to the testsuite.  These updates
include tests for the new log type, and some fixes to some of the
*lvconvert* tests.

14 years agoUse a real socket for singlenode clvmd to fix clvmd's high cpu load.
Mike Snitzer [Fri, 26 Mar 2010 15:45:36 +0000 (15:45 +0000)]
Use a real socket for singlenode clvmd to fix clvmd's high cpu load.

14 years agoFix clvmd cluster propagation of dmeventd monitoring mode.
Mike Snitzer [Fri, 26 Mar 2010 15:40:13 +0000 (15:40 +0000)]
Fix clvmd cluster propagation of dmeventd monitoring mode.

clvmd's do_lock_lv() already properly controls dmeventd monitoring based
on LCK_DMEVENTD_MONITOR_MODE in lock_flags -- though one small fix was
needed for this to work: _lock_for_cluster() must treat
dmeventd_monitor_mode()'s return as a tri-state value.

Also cleanup do_lock_lv() to:
- explicitly init_dmeventd_monitor() based on LCK_DMEVENTD_MONITOR_MODE
- no longer reset init_dmeventd_monitor() to default at the end of
  do_lock_lv() -- it is unnecessary

14 years agoUpdates .so links for plugins
Zdenek Kabelac [Fri, 26 Mar 2010 13:21:28 +0000 (13:21 +0000)]
Updates .so links for plugins

14 years agoAllow ALLOC_ANYWHERE to split contiguous areas.
Alasdair Kergon [Thu, 25 Mar 2010 21:19:26 +0000 (21:19 +0000)]
Allow ALLOC_ANYWHERE to split contiguous areas.

14 years ago.
Alasdair Kergon [Thu, 25 Mar 2010 18:22:39 +0000 (18:22 +0000)]
.

14 years agoUse INTERNAL_ERROR definition consistently in internal error messages.
Alasdair Kergon [Thu, 25 Mar 2010 18:22:04 +0000 (18:22 +0000)]
Use INTERNAL_ERROR definition consistently in internal error messages.

14 years agoAdd some assertions to allocation code.
Alasdair Kergon [Thu, 25 Mar 2010 18:16:54 +0000 (18:16 +0000)]
Add some assertions to allocation code.

14 years agomore diagnostics
Alasdair Kergon [Thu, 25 Mar 2010 12:16:17 +0000 (12:16 +0000)]
more diagnostics

14 years agomore diagnostics
Alasdair Kergon [Thu, 25 Mar 2010 12:14:14 +0000 (12:14 +0000)]
more diagnostics

14 years agoadd debug mesg
Alasdair Kergon [Thu, 25 Mar 2010 11:57:16 +0000 (11:57 +0000)]
add debug mesg

14 years ago.
Alasdair Kergon [Thu, 25 Mar 2010 11:48:54 +0000 (11:48 +0000)]
.

14 years agoadd debug mesgs and attempt to control which device is used for log as perhaps intended
Alasdair Kergon [Thu, 25 Mar 2010 11:47:00 +0000 (11:47 +0000)]
add debug mesgs and attempt to control which device is used for log as perhaps intended

14 years agoadd debug output and attempt to control which device gets log as intended perhaps
Alasdair Kergon [Thu, 25 Mar 2010 11:42:17 +0000 (11:42 +0000)]
add debug output and attempt to control which device gets log as intended perhaps

14 years agoimprove a few comments in last check-in
Alasdair Kergon [Thu, 25 Mar 2010 02:40:09 +0000 (02:40 +0000)]
improve a few comments in last check-in

14 years agoIntroduce pv_area_used into allocation algorithm and add debug messages.
Alasdair Kergon [Thu, 25 Mar 2010 02:31:48 +0000 (02:31 +0000)]
Introduce pv_area_used into allocation algorithm and add debug messages.

This is the next preparatory step towards better --alloc anywhere
support and is not intended to break anything that currently works so
please report any problems - segfaults, bogus data in the new debug
messages, or if the code now chooses bizarre allocation layouts.

14 years agoRevert having clvmd consult the lvm.conf "activation/monitoring".
Mike Snitzer [Wed, 24 Mar 2010 22:25:11 +0000 (22:25 +0000)]
Revert having clvmd consult the lvm.conf "activation/monitoring".
Correctly implementing the intent of this change requires more
analysis.

14 years agoMove declaration of struct dm_info info to declaration block.
Zdenek Kabelac [Wed, 24 Mar 2010 11:36:48 +0000 (11:36 +0000)]
Move declaration of struct dm_info info to declaration block.

14 years agoImprove activation monitoring option processing
Mike Snitzer [Tue, 23 Mar 2010 22:30:18 +0000 (22:30 +0000)]
Improve activation monitoring option processing

. Add "monitoring" option to "activation" section of lvm.conf
. Have clvmd consult the lvm.conf "activation/monitoring" too.
. Introduce toollib.c:get_activation_monitoring_mode().
. Error out when both --monitor and --ignoremonitoring are provided.
. Add --monitor and --ignoremonitoring support to lvcreate.  Update
  lvcreate man page accordingly.
. Clarify that '--monitor' controls the start and stop of monitoring in
  the {vg,lv}change man pages.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
14 years agoAlso honour abort_on_internal_errors when log_fn is set.
Petr Rockai [Tue, 23 Mar 2010 18:18:49 +0000 (18:18 +0000)]
Also honour abort_on_internal_errors when log_fn is set.

14 years agoUDEV_SYNC_SUPPORT, not UDEV_SYNC!
Peter Rajnoha [Tue, 23 Mar 2010 15:13:03 +0000 (15:13 +0000)]
UDEV_SYNC_SUPPORT, not UDEV_SYNC!

14 years agoAllow dynamic extension of array of areas selected as allocation candidates.
Alasdair Kergon [Tue, 23 Mar 2010 15:07:55 +0000 (15:07 +0000)]
Allow dynamic extension of array of areas selected as allocation candidates.

14 years agoExport and use only valid cookie value in test suite.
Peter Rajnoha [Tue, 23 Mar 2010 14:47:35 +0000 (14:47 +0000)]
Export and use only valid cookie value in test suite.

14 years agoAutoreconf.
Peter Rajnoha [Tue, 23 Mar 2010 14:44:42 +0000 (14:44 +0000)]
Autoreconf.

(Strictly require libudev if udev_sync is used)

14 years agoStrictly require libudev if udev_sync is used.
Peter Rajnoha [Tue, 23 Mar 2010 14:43:18 +0000 (14:43 +0000)]
Strictly require libudev if udev_sync is used.

This prevents some confusion when libudev was not found so udev_sync was disabled
automatically. Configure was successful though giving only a tiny warning.

Also, if "dmsetup udevcreatecookie" is used, never return 0x000000 as a result if
udev is not running and keep the output blank.

14 years agoAdd support for ioctl's DM_UEVENT_GENERATED_FLAG.
Peter Rajnoha [Tue, 23 Mar 2010 14:38:37 +0000 (14:38 +0000)]
Add support for ioctl's DM_UEVENT_GENERATED_FLAG.

We need to know whether we should wait for any uevent or not when
using udev_sync. A kernel patch was posted recently that changed the
way uevents are sent on dm device resume - it is sent only if the
device has been suspended before. There's also a new DM_UEVENT_GENERATED_FLAG
in the ioctl to notify userspace whether the event was generated.

If the uevent was not generated (e.g. the situation where the device is
*not* suspended and we call a resume), we just call dm_udev_complete
explicitly from within libdevmapper itself to prevent infinite waiting
while trying to synchronise with udev processing.

14 years agoAvoid duplicate definitions.
Alasdair Kergon [Tue, 23 Mar 2010 14:35:08 +0000 (14:35 +0000)]
Avoid duplicate definitions.

14 years agoRemove const modifier for struct volume_group* from process_each_lv_in_vg().
Zdenek Kabelac [Tue, 23 Mar 2010 14:24:04 +0000 (14:24 +0000)]
Remove const modifier for struct volume_group* from process_each_lv_in_vg().
Content of this pointer is not const during this function.

14 years agoDon't allow resizing of internal logical volumes.
Mike Snitzer [Sat, 20 Mar 2010 03:44:04 +0000 (03:44 +0000)]
Don't allow resizing of internal logical volumes.

Prevent lvresize from being able to resize internal LVs: mirror legs
(*_mimage_*), mirror log (*_mlog), snapshot placeholder LVs (snapshot*)
and others.  Resizing these would leads to unexpected metadata and
sometimes crashes (in case of growing snapshot*).

14 years agoFix libdevmapper-event pkgconfig version string to match libdevmapper.
Alasdair Kergon [Fri, 19 Mar 2010 18:33:55 +0000 (18:33 +0000)]
Fix libdevmapper-event pkgconfig version string to match libdevmapper.

14 years agoUpdate WHATS_NEW for last checkin.
Dave Wysochanski [Thu, 18 Mar 2010 17:32:25 +0000 (17:32 +0000)]
Update WHATS_NEW for last checkin.

14 years agoAvoid scanning all pvs in the system if operating on a device with mdas.
Dave Wysochanski [Thu, 18 Mar 2010 17:29:12 +0000 (17:29 +0000)]
Avoid scanning all pvs in the system if operating on a device with mdas.

When we pv_read() a device that has an orphan vgname, we might need to scan
the system to be sure this is true.  However, if the PV has mdas, there's
no way possible for it to have an orphan vgname unless it is a true orphan.
Some areas of the code were optimized to take advantage of this fact, while
others were not (we would still do the expensive scan if a device had mdas
but had an orphan VG).

This patch unifies the code so that every place we are operating on such
a PV, we skip the expensive scan if there are mdas.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Acked-by: Petr Rockai <prockai@redhat.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
14 years agoautoreconf & add missing WHATS_NEW entry
Alasdair Kergon [Thu, 18 Mar 2010 13:24:35 +0000 (13:24 +0000)]
autoreconf & add missing WHATS_NEW entry

14 years agoRun both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
Petr Rockai [Thu, 18 Mar 2010 09:28:42 +0000 (09:28 +0000)]
Run both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
last checkin).

14 years agoSkip locking_type 3 tests instead of failing when system-wide clvmd is running.
Petr Rockai [Thu, 18 Mar 2010 09:27:39 +0000 (09:27 +0000)]
Skip locking_type 3 tests instead of failing when system-wide clvmd is running.

14 years agoAdd infrastructure for running the functional testsuite with locking_type set
Petr Rockai [Thu, 18 Mar 2010 09:19:30 +0000 (09:19 +0000)]
Add infrastructure for running the functional testsuite with locking_type set
to 3, using a local (singlenode) clvmd.

14 years agoAdd pvchange -u --all to testsuite.
Dave Wysochanski [Wed, 17 Mar 2010 17:02:01 +0000 (17:02 +0000)]
Add pvchange -u --all to testsuite.

This can be an interesting test case when using PVs with --metadatacopies 0.

14 years agotestsuite: get stacktrace if test drops core
Mike Snitzer [Wed, 17 Mar 2010 14:55:28 +0000 (14:55 +0000)]
testsuite: get stacktrace if test drops core

Requires lvm be built with debugging (-g).
Also requires 'ulimit -c' be non-zero (to drop core file).

14 years agoDisable long living process flag in lvm2app.
Milan Broz [Wed, 17 Mar 2010 14:45:28 +0000 (14:45 +0000)]
Disable long living process flag in lvm2app.

This option should be configurable, but for now
do not set it at all.

(lvm2app is used in udisks probers and there
cac cause several nasty races when trying to update
lvmcache during rescan.)

14 years agoFix pvcreate device check.
Milan Broz [Wed, 17 Mar 2010 14:44:18 +0000 (14:44 +0000)]
Fix pvcreate device check.

If user try to vgcreate or vgextend non-existent VG,
these messages appears:

# vgcreate xxx /dev/xxx
  Internal error: Volume Group xxx was not unlocked
  Device /dev/xxx not found (or ignored by filtering).
  Unable to add physical volume '/dev/xxx' to volume group 'xxx'.
  Internal error: Attempt to unlock unlocked VG xxx.

(the same with existing VG and non-existing PV & vgextend)
# vgextend vg_test /dev/xxx
...

It is caused because code tries to "refresh" cache if
md filter is switched on using cache destroy.

But we can change filters and rescan even without this
machinery now, just use refresh_filters
(and reset md filter afterwards).

(Patch also  discovers cache alias bug in vgsplit test,
fix it by using better filter line.)

14 years agoSuppress repeated errors about the same missing PV uuids.
Alasdair Kergon [Wed, 17 Mar 2010 02:11:18 +0000 (02:11 +0000)]
Suppress repeated errors about the same missing PV uuids.
Bypass full device scans when using internally-cached VG metadata.

14 years agofix last checkin
Alasdair Kergon [Tue, 16 Mar 2010 19:06:57 +0000 (19:06 +0000)]
fix last checkin

14 years agoOnly do one full device scan during each read of text format metadata.
Alasdair Kergon [Tue, 16 Mar 2010 17:30:00 +0000 (17:30 +0000)]
Only do one full device scan during each read of text format metadata.

14 years agoRemove unnecessary full_scan parameter from get_vgids and get_vgnames calls.
Alasdair Kergon [Tue, 16 Mar 2010 16:57:03 +0000 (16:57 +0000)]
Remove unnecessary full_scan parameter from get_vgids and get_vgnames calls.

14 years agoreplace existing_pv with existing_pvl
Alasdair Kergon [Tue, 16 Mar 2010 15:48:27 +0000 (15:48 +0000)]
replace existing_pv with existing_pvl

14 years agoLook up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat.
Alasdair Kergon [Tue, 16 Mar 2010 15:30:48 +0000 (15:30 +0000)]
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.

14 years agoIntroduce is_missing_pv().
Alasdair Kergon [Tue, 16 Mar 2010 14:37:38 +0000 (14:37 +0000)]
Introduce is_missing_pv().

14 years agoFix clvmd Makefile to not overwrite LIBS from template definition
Milan Broz [Tue, 16 Mar 2010 08:47:46 +0000 (08:47 +0000)]
Fix clvmd Makefile to not overwrite LIBS from template definition

14 years agopost-release
Alasdair Kergon [Tue, 9 Mar 2010 14:01:47 +0000 (14:01 +0000)]
post-release

14 years agopre-release cleanups
Alasdair Kergon [Tue, 9 Mar 2010 13:42:28 +0000 (13:42 +0000)]
pre-release cleanups

14 years agopre-release
Alasdair Kergon [Tue, 9 Mar 2010 13:13:07 +0000 (13:13 +0000)]
pre-release

14 years agosome missing debug messages
Alasdair Kergon [Tue, 9 Mar 2010 12:31:51 +0000 (12:31 +0000)]
some missing debug messages

14 years agoUpdate comments for selecting maps
Zdenek Kabelac [Tue, 9 Mar 2010 10:25:50 +0000 (10:25 +0000)]
Update comments for selecting maps
Use dm_snprintf and check result whether we create correct /proc path name

14 years ago.
Alasdair Kergon [Tue, 9 Mar 2010 03:20:12 +0000 (03:20 +0000)]
.

14 years agoMisc cleanups in the new mlock code, incl. improving some variable names
Alasdair Kergon [Tue, 9 Mar 2010 03:16:11 +0000 (03:16 +0000)]
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.

14 years agoUse mlock() only on 'r' memory maps
Zdenek Kabelac [Mon, 8 Mar 2010 17:14:21 +0000 (17:14 +0000)]
Use mlock() only on 'r' memory maps

14 years agoAdd --help dmsetup option as the synonym for help command.
Milan Broz [Mon, 8 Mar 2010 16:05:07 +0000 (16:05 +0000)]
Add --help dmsetup option as the synonym for help command.

14 years agoAdd --showkeys parameter description into dmsetup man page.
Milan Broz [Mon, 8 Mar 2010 16:04:32 +0000 (16:04 +0000)]
Add --showkeys parameter description into dmsetup man page.

Also fix minor warning (-c is parameter) in man page formatting.

14 years agoUnconditionaly ignore also Virtual Dynamically-linked Shared Object
Zdenek Kabelac [Mon, 8 Mar 2010 15:55:52 +0000 (15:55 +0000)]
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.

14 years agoUse '_' prefix for local static variable.
Zdenek Kabelac [Fri, 5 Mar 2010 15:14:03 +0000 (15:14 +0000)]
Use '_' prefix for local static variable.

14 years agomlockall() -> mlock()
Zdenek Kabelac [Fri, 5 Mar 2010 14:48:33 +0000 (14:48 +0000)]
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.

14 years agoUse UDEV_LIBS, and link -ludev only when needed.
Zdenek Kabelac [Thu, 4 Mar 2010 12:12:34 +0000 (12:12 +0000)]
Use UDEV_LIBS, and link -ludev only when needed.

14 years agoUse DL_LIBS, remove -ldl from global LIBS and link -ldl only when needed.
Zdenek Kabelac [Thu, 4 Mar 2010 12:10:40 +0000 (12:10 +0000)]
Use DL_LIBS, remove -ldl from global LIBS and link -ldl only when needed.

14 years agoThis patch add SELINUX_LIBS and STATIC_LIBS variables.
Zdenek Kabelac [Thu, 4 Mar 2010 12:08:26 +0000 (12:08 +0000)]
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.

14 years agoRemoves -rdynamic from linking of lvm.static and dmeventd.static.
Zdenek Kabelac [Thu, 4 Mar 2010 12:03:54 +0000 (12:03 +0000)]
Removes -rdynamic from linking of lvm.static and dmeventd.static.

14 years agoPthread linking change
Zdenek Kabelac [Thu, 4 Mar 2010 11:21:05 +0000 (11:21 +0000)]
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

14 years agoReadline linking update
Zdenek Kabelac [Thu, 4 Mar 2010 11:19:15 +0000 (11:19 +0000)]
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).

14 years agoIntroduce LVMINTERNAL_LIBS
Zdenek Kabelac [Thu, 4 Mar 2010 11:12:39 +0000 (11:12 +0000)]
Introduce LVMINTERNAL_LIBS

Keep dependency libraries for liblvm-internal in one place.

14 years agoAs fsadm is installed by default - it's a common practice to rather
Zdenek Kabelac [Thu, 4 Mar 2010 11:09:08 +0000 (11:09 +0000)]
As fsadm is installed by default - it's a common practice to rather
print help text in '--disable' form for such case.

14 years agoThis patch moves inclusion of the make.tmpl before DEFS modification,
Zdenek Kabelac [Thu, 4 Mar 2010 09:56:56 +0000 (09:56 +0000)]
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)

14 years agoUse consistently $() instead of ${} for all Makefile variables,
Zdenek Kabelac [Thu, 4 Mar 2010 09:56:01 +0000 (09:56 +0000)]
Use consistently $() instead of ${} for all Makefile variables,
thought both usage forms are correct.

14 years agoReplace CFLOW_CMD only in make.tmpl and use it as variable elsewhere.
Zdenek Kabelac [Thu, 4 Mar 2010 09:53:08 +0000 (09:53 +0000)]
Replace CFLOW_CMD only in make.tmpl and use it as variable elsewhere.

14 years agoUse $(top_builddir) for inclusion of make.tmpl in Makefiles.
Zdenek Kabelac [Thu, 4 Mar 2010 09:51:37 +0000 (09:51 +0000)]
Use $(top_builddir) for inclusion of make.tmpl in Makefiles.

14 years agoUse datarootdir and fix warning during configure process:
Zdenek Kabelac [Thu, 4 Mar 2010 09:48:19 +0000 (09:48 +0000)]
Use datarootdir and fix warning during configure process:
config.status: WARNING:  'make.tmpl.in' seems to ignore the --datarootdir setting.

14 years agoUsage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61.
Zdenek Kabelac [Thu, 4 Mar 2010 09:46:38 +0000 (09:46 +0000)]
Usage of AC_PROG_SED and AC_PROG_MKDIR_P requires autoconf version 2.61.

14 years agoHandle a misaligned device that reports a -1 alignment_offset.
Mike Snitzer [Tue, 2 Mar 2010 21:56:14 +0000 (21:56 +0000)]
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.

14 years agoExtend core allocation code in preparation for mirrored log areas.
Alasdair Kergon [Mon, 1 Mar 2010 20:00:20 +0000 (20:00 +0000)]
Extend core allocation code in preparation for mirrored log areas.

14 years ago- fix whitespaces all over (tabs/spaces)
Fabio M. Di Nitto [Fri, 26 Feb 2010 13:07:43 +0000 (13:07 +0000)]
- 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

14 years agoRemove lvs_in_vg_activated_by_uuid_only call.
Milan Broz [Wed, 24 Feb 2010 20:01:40 +0000 (20:01 +0000)]
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.

14 years agoAlways query device by uuid only.
Milan Broz [Wed, 24 Feb 2010 20:00:56 +0000 (20:00 +0000)]
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).

14 years agoUpdate WHATS_NEW.
Dave Wysochanski [Wed, 24 Feb 2010 18:21:15 +0000 (18:21 +0000)]
Update WHATS_NEW.

14 years agoAdd Doxygen file for lvm2app to generate documentation from lvm2app.h.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:54 +0000 (18:16 +0000)]
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>
14 years agoUpdate doxygen comments for lvm2app.h.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:44 +0000 (18:16 +0000)]
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>
14 years agoUpdate lvm2app interactive unit test for vg/lv tags.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:35 +0000 (18:16 +0000)]
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>
14 years agoAdd lvm_lv_get_tags(), lvm_lv_add_tag(), and lvm_lv_remove_tag().
Dave Wysochanski [Wed, 24 Feb 2010 18:16:26 +0000 (18:16 +0000)]
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>
14 years agoAdd lvm_vg_get_tags(), lvm_vg_add_tag(), and lvm_vg_remove_tag().
Dave Wysochanski [Wed, 24 Feb 2010 18:16:18 +0000 (18:16 +0000)]
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>
14 years agoAdd tag_list_copy() supporting function inside lvm2app.
Dave Wysochanski [Wed, 24 Feb 2010 18:16:10 +0000 (18:16 +0000)]
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>
14 years agoAdd dm_pool_strdup to allocate memory and copy a tag in {lv|vg}_change_tag()
Dave Wysochanski [Wed, 24 Feb 2010 18:15:57 +0000 (18:15 +0000)]
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>
14 years agoRefactor lvchange_tag() to call lv_change_tag() library function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:49 +0000 (18:15 +0000)]
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>
14 years agoRefactor vgcreate to call new vg_change_tag() function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:40 +0000 (18:15 +0000)]
Refactor vgcreate to call new vg_change_tag() function.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoRefactor _vgchange_tag() to vg_change_tag() library function.
Dave Wysochanski [Wed, 24 Feb 2010 18:15:05 +0000 (18:15 +0000)]
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>
14 years agoAdd _mlog devices to dependency trees using UUID, not name, in activation.
Petr Rockai [Tue, 23 Feb 2010 15:49:52 +0000 (15:49 +0000)]
Add _mlog devices to dependency trees using UUID, not name, in activation.

14 years agoRelax a check on blkid exit value, which seems to be different in different
Petr Rockai [Mon, 22 Feb 2010 14:47:55 +0000 (14:47 +0000)]
Relax a check on blkid exit value, which seems to be different in different
versions. Fixes a spurious test failure introduced with -o pipefail.

14 years agoDo not reload origin again in lv_remove_single() if it had a merging
Mike Snitzer [Wed, 17 Feb 2010 23:36:45 +0000 (23:36 +0000)]
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.

14 years agoRefactor snapshot-merge deptree and device removal to support info-by-uuid
Mike Snitzer [Wed, 17 Feb 2010 22:59:46 +0000 (22:59 +0000)]
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>
14 years agoIn testsuite, catch also failures that happen in the middle of a pipeline.
Petr Rockai [Wed, 17 Feb 2010 15:41:28 +0000 (15:41 +0000)]
In testsuite, catch also failures that happen in the middle of a pipeline.

14 years agoAdd nightly test to cover vg/lv tags add/delete.
Dave Wysochanski [Tue, 16 Feb 2010 17:49:18 +0000 (17:49 +0000)]
Add nightly test to cover vg/lv tags add/delete.

Simple nightly test coverage for adding / deleting lv/vg tags via
create and change functions.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agoAdd get_{pv|vg|lv}_field() nightly test helper functions.
Dave Wysochanski [Tue, 16 Feb 2010 17:48:46 +0000 (17:48 +0000)]
Add get_{pv|vg|lv}_field() nightly test helper functions.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
14 years agouse lvm2app to refer to library now
Alasdair Kergon [Tue, 16 Feb 2010 01:14:34 +0000 (01:14 +0000)]
use lvm2app to refer to library now

14 years agopost-release
Alasdair Kergon [Tue, 16 Feb 2010 00:27:01 +0000 (00:27 +0000)]
post-release

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