]>
sourceware.org Git - lvm2.git/log
Peter Rajnoha [Mon, 5 Mar 2012 12:40:34 +0000 (12:40 +0000)]
Clean up internal mangling interface.
Zdenek Kabelac [Sun, 4 Mar 2012 17:40:59 +0000 (17:40 +0000)]
Validate udev structures
Avoid using NULL pointers from udev. It seems like some older versions of udev
were improperly returning NULL in some case, so do not silently break here,
and give at least a warning to the user.
Zdenek Kabelac [Sun, 4 Mar 2012 17:36:23 +0000 (17:36 +0000)]
Return success for deactivation of thin pool
if the thin_check fail on thin pool - still return successful deactivation,
since lvremove would currently fail.
TODO: find some way to not run check with lvremove.
Zdenek Kabelac [Sun, 4 Mar 2012 16:05:42 +0000 (16:05 +0000)]
Remove part of FIXME
(and reindent a code below)
Zdenek Kabelac [Sun, 4 Mar 2012 16:04:52 +0000 (16:04 +0000)]
Update thin test for thin_check
Test if thin_check is present in system and disable its use, when its missing.
Add testing for poolmetadatasize.
FIXME: Allocation policy for metadata pool might need some relaxing.
(For now it needs to put all block on one PV.)
Zdenek Kabelac [Sun, 4 Mar 2012 16:02:19 +0000 (16:02 +0000)]
Speedup test run by a few minutes
Reduce disc excercise for some test and focus on LVM testing by
using smaller extent size.
Reduce number of teardown_devs calls and use vg/lvremove instead.
Don't sleep for seconds on pvmove.
FIXME: shell/lvconvert-mirror-basic.sh seems to need more checking.
Test fails for smalled extent size then 512k.
Zdenek Kabelac [Sun, 4 Mar 2012 15:58:31 +0000 (15:58 +0000)]
Add FIXMEs
Processing loop needs some thinking
Zdenek Kabelac [Sun, 4 Mar 2012 15:57:27 +0000 (15:57 +0000)]
Just make error message more clear
Make more obvious, the origin LV for snapshot must be active.
Alasdair Kergon [Sat, 3 Mar 2012 18:32:53 +0000 (18:32 +0000)]
Scan all devices for lvmetad if 'pvscan --cache' used without device list.
Alasdair Kergon [Sat, 3 Mar 2012 17:12:21 +0000 (17:12 +0000)]
Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGs
don't appear.
Alasdair Kergon [Sat, 3 Mar 2012 17:03:20 +0000 (17:03 +0000)]
Reinstate accidentally-deleted line.
Alasdair Kergon [Sat, 3 Mar 2012 02:08:37 +0000 (02:08 +0000)]
post-release
Alasdair Kergon [Sat, 3 Mar 2012 01:28:15 +0000 (01:28 +0000)]
.
Alasdair Kergon [Sat, 3 Mar 2012 01:00:49 +0000 (01:00 +0000)]
pre-release
Zdenek Kabelac [Fri, 2 Mar 2012 23:01:10 +0000 (23:01 +0000)]
Code refactoring
Properly test for dm_asprintf result.
Keep unlocking of mutex in the same function and do not spread lock and
unlock over functions.
Zdenek Kabelac [Fri, 2 Mar 2012 22:58:23 +0000 (22:58 +0000)]
Just space moving
Don't leave space on EOL.
Zdenek Kabelac [Fri, 2 Mar 2012 22:57:25 +0000 (22:57 +0000)]
List _thread_registry missed mutex
Operation on _thread_registry needs to be covered by mutex.
Cosmetic move a die code after free for valgind short leak list.
Alasdair Kergon [Fri, 2 Mar 2012 22:44:31 +0000 (22:44 +0000)]
a fixme
Zdenek Kabelac [Fri, 2 Mar 2012 21:53:17 +0000 (21:53 +0000)]
Support 16GB for thin pool metadata
Add some hack math to allow 16GB devices to be passed as thinpool metadata.
Since kernel has put in limit to not allow which are just bigger then
some predefined constant in kernel but not matching 16GB so any device bigger
is rejected.
FIXME: Current code still might need more tweaks to be more generic.
Alasdair Kergon [Fri, 2 Mar 2012 21:50:02 +0000 (21:50 +0000)]
fix non-lvmetad pvscan macro
Zdenek Kabelac [Fri, 2 Mar 2012 21:49:43 +0000 (21:49 +0000)]
Add support for thin check
Use libdm callback to execute thin_check before activation
thin pool and after deactivation as well.
Supporting thin_check_executable which may pass in extra options for
the tool.
Zdenek Kabelac [Fri, 2 Mar 2012 21:43:26 +0000 (21:43 +0000)]
Purge remaining trim bits from code
Alasdair Kergon [Fri, 2 Mar 2012 21:24:37 +0000 (21:24 +0000)]
missing reply frees
Alasdair Kergon [Fri, 2 Mar 2012 20:46:36 +0000 (20:46 +0000)]
Pass struct device around internally rather than dev_t.
Add 3rd daemon return state "unknown" for lookups that are carried out
successfully but don't find the item requested.
Avoid issuing error messages when it's expected that a device that's
being looked up in lvmetad might not be there.
Zdenek Kabelac [Fri, 2 Mar 2012 20:18:25 +0000 (20:18 +0000)]
Merge metadata size checking
Move the code for poolmetadatasize operation into one place.
Report override for minimum and maximum size.
Drop _read_thin_params function its error reporting is handled elsewhere.
Alasdair Kergon [Fri, 2 Mar 2012 18:09:46 +0000 (18:09 +0000)]
Change pvscan --lvmetad to pvscan --cache.
Zdenek Kabelac [Fri, 2 Mar 2012 17:31:21 +0000 (17:31 +0000)]
Added dm_tree_node_set_callback() for preload and deactivation hooks
Run users hook after preload for the node is finished,
or after the node has been deactivated.
Zdenek Kabelac [Fri, 2 Mar 2012 17:25:21 +0000 (17:25 +0000)]
Fix estimation of pool metadata device size
If no size was give the later added minimal size check efectively
disable this code. Also the argument for size now must be kept
in sector_size, so adding division by SECTOR_SIZE (moved into
a const expression)
Alasdair Kergon [Fri, 2 Mar 2012 16:58:41 +0000 (16:58 +0000)]
Allow multiple device names with pvscan --lvmetad.
Hold global lock in pvscan --lvmetad. (This might need refinement.)
Add PV name to "PV gone" messages.
Adjust some log message severities. (More changes needed.)
Zdenek Kabelac [Fri, 2 Mar 2012 13:26:08 +0000 (13:26 +0000)]
Remove support for TRIM message
It's been unsupporte for now - and it's not going to be
implemented for thin pool kernel driver - so dropping
appearence of TRIM from libdm and lvm.
Alasdair Kergon [Fri, 2 Mar 2012 02:55:45 +0000 (02:55 +0000)]
Reinstate error if e.g. daemon comms fails.
Zdenek Kabelac [Fri, 2 Mar 2012 00:08:48 +0000 (00:08 +0000)]
Wait for mirror in sync
1s could be too short
Zdenek Kabelac [Thu, 1 Mar 2012 23:20:45 +0000 (23:20 +0000)]
Check for error from dup2
Do not take correct fd as error result.
Zdenek Kabelac [Thu, 1 Mar 2012 22:55:21 +0000 (22:55 +0000)]
Add traceback for failpath
Zdenek Kabelac [Thu, 1 Mar 2012 22:54:17 +0000 (22:54 +0000)]
Skip zero length messages
In case of zero length message, there would be a memory leak on
return path from _do_process_request.
Zdenek Kabelac [Thu, 1 Mar 2012 22:52:59 +0000 (22:52 +0000)]
Check allocated pointers
Test pointers from allocation against NULL.
Error paths should be checked, some of them probably need
some extesions.
Zdenek Kabelac [Thu, 1 Mar 2012 22:06:18 +0000 (22:06 +0000)]
Improve logging
Use %m for strerror.
Switch to use 0 for fail return code.
Zdenek Kabelac [Thu, 1 Mar 2012 21:58:55 +0000 (21:58 +0000)]
Check pointer before deref in debug message
Zdenek Kabelac [Thu, 1 Mar 2012 21:57:43 +0000 (21:57 +0000)]
Explicitely ignore fail from this label_read
Zdenek Kabelac [Thu, 1 Mar 2012 21:56:44 +0000 (21:56 +0000)]
Add some more pointer validation
Ensure _display_name() and _add_dep() would not deref NULL names.
Switch to use internal dm_basename().
Zdenek Kabelac [Thu, 1 Mar 2012 21:49:32 +0000 (21:49 +0000)]
Test alloc fail
Zdenek Kabelac [Thu, 1 Mar 2012 21:46:31 +0000 (21:46 +0000)]
Replace goto with just log_debug
FIXME: temporal quick hack to make things green
There might be a better reaction.
Zdenek Kabelac [Thu, 1 Mar 2012 21:21:54 +0000 (21:21 +0000)]
Check for alloc error
Simplify segtype_str usage and check for NULL segtype.
Zdenek Kabelac [Thu, 1 Mar 2012 21:19:20 +0000 (21:19 +0000)]
Log sys error for lseek
Zdenek Kabelac [Thu, 1 Mar 2012 21:18:38 +0000 (21:18 +0000)]
Debug log for hold_lock failure
Zdenek Kabelac [Thu, 1 Mar 2012 21:17:29 +0000 (21:17 +0000)]
Log sys errors
Zdenek Kabelac [Thu, 1 Mar 2012 21:16:44 +0000 (21:16 +0000)]
Backtrace for failing drop_cached_metadata
Zdenek Kabelac [Thu, 1 Mar 2012 21:16:05 +0000 (21:16 +0000)]
Check for udev_get_dev_dir result
Don't use NULL return value.
Zdenek Kabelac [Thu, 1 Mar 2012 21:14:43 +0000 (21:14 +0000)]
Correct enum type
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
Zdenek Kabelac [Thu, 1 Mar 2012 21:12:37 +0000 (21:12 +0000)]
Few more close and dev_close trace
Adding (void) where we cannot really report an error.
Petr Rockai [Thu, 1 Mar 2012 20:04:44 +0000 (20:04 +0000)]
Use 64 bit integers for device size & label sector in _pv_populate_lvmcache in
lvmetad client code. Fixes RHBZ 798267.
Petr Rockai [Thu, 1 Mar 2012 20:03:45 +0000 (20:03 +0000)]
Add a regression test for the PSize bug in pvs/lvmetad.
Petr Rockai [Thu, 1 Mar 2012 19:54:53 +0000 (19:54 +0000)]
Use 64 bit integers whenever extracting numbers from daemon replies.
Jonathan Earl Brassow [Thu, 1 Mar 2012 17:41:39 +0000 (17:41 +0000)]
s/CPG_/CS_: Various CPG constants are going away, even though CPG itself stays
F17 is getting rid of OpenAIS libraries (and checkpointing). While the
CPG stuff is staying, some if its constants are being removed. So, we
must adjust and use the remaining constants which the CPG constants were based on.
[~]# egrep 'CPG_DISPATCH_ALL|CPG_OK' /usr/include/*/*
corosync/corotypes.h:#define CPG_DISPATCH_ALL CS_DISPATCH_ALL
corosync/corotypes.h:#define CPG_OK CS_OK
Zdenek Kabelac [Thu, 1 Mar 2012 10:46:39 +0000 (10:46 +0000)]
Missed ;
Zdenek Kabelac [Thu, 1 Mar 2012 10:41:48 +0000 (10:41 +0000)]
More useful debug message
Zdenek Kabelac [Thu, 1 Mar 2012 10:39:21 +0000 (10:39 +0000)]
Add _rimage as reserved suffix
Zdenek Kabelac [Thu, 1 Mar 2012 10:31:35 +0000 (10:31 +0000)]
Add cast for ptrdiff_t - cleanup gcc warning
Zdenek Kabelac [Thu, 1 Mar 2012 10:30:48 +0000 (10:30 +0000)]
Improve error logging
Log errors instead of plain return 0.
Check for f->private strdup result.
Zdenek Kabelac [Thu, 1 Mar 2012 10:09:36 +0000 (10:09 +0000)]
Add stack trace for lv_reduce
Use common code call with stack trace.
TODO: maybe the release_lv_segment_area()
should be actually able to return error code to upper level.
Zdenek Kabelac [Thu, 1 Mar 2012 10:07:38 +0000 (10:07 +0000)]
Check for version string buffer
Since lvm seems to call driver_version(NULL, 0) this would lead
to crash. Though the combination of the code is probably very hard to hit.
If the user doesn't supply version buffer, just skip printing to buffer.
Zdenek Kabelac [Thu, 1 Mar 2012 09:54:23 +0000 (09:54 +0000)]
Check for allocation error
return ENOMEM when malloc fails.
Zdenek Kabelac [Thu, 1 Mar 2012 09:50:04 +0000 (09:50 +0000)]
Log fail of pthread_join
Syslog error outside of mutex section.
Zdenek Kabelac [Thu, 1 Mar 2012 09:46:38 +0000 (09:46 +0000)]
Fix leak of FID structure
Zdenek Kabelac [Wed, 29 Feb 2012 22:08:57 +0000 (22:08 +0000)]
Wipe initial 4KiB for non-zeroed thin volumes
If the thin pool has disabled zeroing (created with -Zn), we at least
clear initial 4KiB of such thin volume (provisions 1st block).
If lvcreate is executed with '-an' command will abort (same way like we for
normal LV - however for normal LV option -Zn may skip clearing completely,
for thin volumes this option is not supported (applies only for pools).
Jonathan Earl Brassow [Wed, 29 Feb 2012 21:15:34 +0000 (21:15 +0000)]
Allow cluster mirrors to handle the absence of the checkpoint lib (libSaCkpt).
The OpenAIS checkpoint library is going away; therefore, cmirrord must
operate without it. The algorithms the handle the timing of when to send
a checkpoint, the determination of what to send, and which ongoing cluster
requests are relevent with respect to the checkpoints are unaffected. We
need only replace the functions that actually perform the storing/transmitting
and retrieving/receiving of the checkpoint data. Rather than store the
checkpoint data in an OpenAIS checkpoint file, we simply transmit it along
with the message that notifies the incoming node that the checkpoint is
ready.
Alasdair Kergon [Wed, 29 Feb 2012 02:35:35 +0000 (02:35 +0000)]
Pass 'single_device' parameter down to suppress 'Can't find uuid' messages
when reading VG text metadate and called from pvscan --lvmetad.
(Longer-term, that check needs moving outside of that code.)
Petr Rockai [Wed, 29 Feb 2012 00:19:14 +0000 (00:19 +0000)]
Fix a whitespace bug in the last checkin.
Petr Rockai [Wed, 29 Feb 2012 00:18:27 +0000 (00:18 +0000)]
Attempt a fix for lvm shell accumulating copies of orphan PVs with each "pvs"
invocation.
Alasdair Kergon [Tue, 28 Feb 2012 18:35:32 +0000 (18:35 +0000)]
expose new include files to build
Alasdair Kergon [Tue, 28 Feb 2012 18:35:04 +0000 (18:35 +0000)]
Reflect new file locations, include file updates etc.
Alasdair Kergon [Tue, 28 Feb 2012 18:31:28 +0000 (18:31 +0000)]
remove old makefile
Alasdair Kergon [Tue, 28 Feb 2012 18:30:39 +0000 (18:30 +0000)]
move daemon files
Alasdair Kergon [Tue, 28 Feb 2012 18:26:40 +0000 (18:26 +0000)]
new makefiles
Alasdair Kergon [Tue, 28 Feb 2012 18:25:48 +0000 (18:25 +0000)]
Series of commits to move daemon code into separate top-level dir and
fix build deps etc.
Alasdair Kergon [Tue, 28 Feb 2012 18:23:56 +0000 (18:23 +0000)]
Invert some return codes (which used to get ignored anyway) in cases when
lvmetad is not being used.
Alasdair Kergon [Tue, 28 Feb 2012 18:22:52 +0000 (18:22 +0000)]
Bypass lvmetad fns when not configured to use lvmetad.
Alasdair Kergon [Tue, 28 Feb 2012 18:20:58 +0000 (18:20 +0000)]
Add LVMETAD_SUPPORT
Alasdair Kergon [Tue, 28 Feb 2012 18:20:17 +0000 (18:20 +0000)]
If lvmetad fails, don't set _has_scanned
Alasdair Kergon [Tue, 28 Feb 2012 18:18:48 +0000 (18:18 +0000)]
Define LVMETAD_SUPPORT in source code
Alasdair Kergon [Tue, 28 Feb 2012 18:17:37 +0000 (18:17 +0000)]
spacing
Alasdair Kergon [Tue, 28 Feb 2012 18:16:23 +0000 (18:16 +0000)]
I don't think -u is meant to be used with lvmetad
Alasdair Kergon [Tue, 28 Feb 2012 18:08:08 +0000 (18:08 +0000)]
Check return values after calling new lvmetad fns
(Haven't checked error path handling though)
Alasdair Kergon [Tue, 28 Feb 2012 17:46:47 +0000 (17:46 +0000)]
Fix empty string warning logic in _find_config_str. (1.02.68)
pvcreate gives
WARNING: Ignoring unsupported value for metadata/pvmetadataignore.
It was warning if there is no config file entry instead of only if the node
exists but is empty.
Zdenek Kabelac [Tue, 28 Feb 2012 14:25:37 +0000 (14:25 +0000)]
Check for failing dm_asprintf
Zdenek Kabelac [Tue, 28 Feb 2012 14:24:57 +0000 (14:24 +0000)]
Using enum types for enums
alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
Zdenek Kabelac [Tue, 28 Feb 2012 14:23:41 +0000 (14:23 +0000)]
Revert free of allocated segtype
lvm_register_segtype takes ownership of segtype and call destructor
for it in error path.
Peter Rajnoha [Tue, 28 Feb 2012 13:07:03 +0000 (13:07 +0000)]
LVMetaD socket operates in non-blocking mode.
Peter Rajnoha [Tue, 28 Feb 2012 13:05:21 +0000 (13:05 +0000)]
Add support for systemd socket handover for common daemon-server code and also add support for new OOM killer adjustment interface.
This code is already a part of dmeventd, but it's modified slightly to check
sockets instead of FIFOs.
Zdenek Kabelac [Tue, 28 Feb 2012 11:12:58 +0000 (11:12 +0000)]
Test dm_hash_insert() failures mem failures
Zdenek Kabelac [Tue, 28 Feb 2012 11:10:45 +0000 (11:10 +0000)]
Check error from _lv_each_dependency
_lv_mark_if_partial_collect cannot fail, however it's good to keep
checking here as we do in all other cases.
Zdenek Kabelac [Tue, 28 Feb 2012 11:09:06 +0000 (11:09 +0000)]
Check result of export_vg_to_buffer
and avoid usage of failed buffer.
Zdenek Kabelac [Tue, 28 Feb 2012 11:08:04 +0000 (11:08 +0000)]
Add stacktrace for init_lvmcache_orphans fail path
Zdenek Kabelac [Tue, 28 Feb 2012 11:06:56 +0000 (11:06 +0000)]
Ensure clvmd message is always \0 terminated
Drop whole buffer clearing (most messages at <100 bytes).
Just make sure we have always \0 terminated string for strlen() operations.
(before for PIPE_BUF sized messages this was not set).
Zdenek Kabelac [Tue, 28 Feb 2012 11:03:24 +0000 (11:03 +0000)]
Better detection of missing dmeventd fifo connection
Zdenek Kabelac [Tue, 28 Feb 2012 10:42:20 +0000 (10:42 +0000)]
Missed to properly merge patch for definition of MAX_MISSING_LEN
(fix previous commit)
Zdenek Kabelac [Tue, 28 Feb 2012 10:14:06 +0000 (10:14 +0000)]
Add log_sys_error for close
Zdenek Kabelac [Tue, 28 Feb 2012 10:11:35 +0000 (10:11 +0000)]
Add some stack traces for dev_close error paths
Zdenek Kabelac [Tue, 28 Feb 2012 10:10:07 +0000 (10:10 +0000)]
Explicitely ignore errors in label_read iteration.
We don't want stack traces here, so mark as void.
Zdenek Kabelac [Tue, 28 Feb 2012 10:08:20 +0000 (10:08 +0000)]
Explicitely check list size of segments
instead of checking for NULL from last_seg and first_seg.
This page took 0.058945 seconds and 5 git commands to generate.