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

6649 Commits

Author SHA1 Message Date
Zdenek Kabelac
0438b15353 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.
2012-03-02 22:57:25 +00:00
Alasdair Kergon
8d2c7d28cc a fixme 2012-03-02 22:44:31 +00:00
Zdenek Kabelac
7162a25b0b 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.
2012-03-02 21:53:17 +00:00
Alasdair Kergon
ffe898ca9f fix non-lvmetad pvscan macro 2012-03-02 21:50:02 +00:00
Zdenek Kabelac
6c7a6c07ee 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.
2012-03-02 21:49:43 +00:00
Zdenek Kabelac
4bcaf8086e Purge remaining trim bits from code 2012-03-02 21:43:26 +00:00
Alasdair Kergon
865738f271 missing reply frees 2012-03-02 21:24:37 +00:00
Alasdair Kergon
9c159ea320 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.
2012-03-02 20:46:36 +00:00
Zdenek Kabelac
79c42c6600 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.
2012-03-02 20:18:25 +00:00
Alasdair Kergon
d742cdf327 Change pvscan --lvmetad to pvscan --cache. 2012-03-02 18:09:46 +00:00
Zdenek Kabelac
7e35dfff3d 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.
2012-03-02 17:31:21 +00:00
Zdenek Kabelac
1babf24949 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)
2012-03-02 17:25:21 +00:00
Alasdair Kergon
d06f64dd29 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.)
2012-03-02 16:58:41 +00:00
Zdenek Kabelac
6a5706a3a5 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.
2012-03-02 13:26:08 +00:00
Alasdair Kergon
b804340f01 Reinstate error if e.g. daemon comms fails. 2012-03-02 02:55:45 +00:00
Zdenek Kabelac
e70d12be9e Wait for mirror in sync
1s could be too short
2012-03-02 00:08:48 +00:00
Zdenek Kabelac
6ddce3b6a7 Check for error from dup2
Do not take correct fd as error result.
2012-03-01 23:20:45 +00:00
Zdenek Kabelac
79e4194e59 Add traceback for failpath 2012-03-01 22:55:21 +00:00
Zdenek Kabelac
475c751076 Skip zero length messages
In case of zero length message, there would be a memory leak on
return path from _do_process_request.
2012-03-01 22:54:17 +00:00
Zdenek Kabelac
099aca0311 Check allocated pointers
Test pointers from allocation against NULL.
Error paths should be checked, some of them probably need
some extesions.
2012-03-01 22:52:59 +00:00
Zdenek Kabelac
96b93199a0 Improve logging
Use %m for strerror.
Switch to use 0 for fail return code.
2012-03-01 22:06:18 +00:00
Zdenek Kabelac
ec19a5a62f Check pointer before deref in debug message 2012-03-01 21:58:55 +00:00
Zdenek Kabelac
7038d527a6 Explicitely ignore fail from this label_read 2012-03-01 21:57:43 +00:00
Zdenek Kabelac
d2ebc1dfa0 Add some more pointer validation
Ensure _display_name() and _add_dep() would not deref NULL names.
Switch to use internal dm_basename().
2012-03-01 21:56:44 +00:00
Zdenek Kabelac
52f76a7682 Test alloc fail 2012-03-01 21:49:32 +00:00
Zdenek Kabelac
0ab5e0e280 Replace goto with just log_debug
FIXME: temporal quick hack to make things green
There might be a better reaction.
2012-03-01 21:46:31 +00:00
Zdenek Kabelac
1281a5e3d5 Check for alloc error
Simplify segtype_str usage and check for NULL segtype.
2012-03-01 21:21:54 +00:00
Zdenek Kabelac
cf518842b4 Log sys error for lseek 2012-03-01 21:19:20 +00:00
Zdenek Kabelac
dc1be80b26 Debug log for hold_lock failure 2012-03-01 21:18:38 +00:00
Zdenek Kabelac
bead3fc2c0 Log sys errors 2012-03-01 21:17:29 +00:00
Zdenek Kabelac
de3692152f Backtrace for failing drop_cached_metadata 2012-03-01 21:16:44 +00:00
Zdenek Kabelac
46e681ca62 Check for udev_get_dev_dir result
Don't use NULL return value.
2012-03-01 21:16:05 +00:00
Zdenek Kabelac
f3c177312f Correct enum type
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
2012-03-01 21:14:43 +00:00
Zdenek Kabelac
c452307543 Few more close and dev_close trace
Adding (void) where we cannot really report an error.
2012-03-01 21:12:37 +00:00
Petr Rockai
bea2f61935 Use 64 bit integers for device size & label sector in _pv_populate_lvmcache in
lvmetad client code. Fixes RHBZ 798267.
2012-03-01 20:04:44 +00:00
Petr Rockai
8cf54e6e13 Add a regression test for the PSize bug in pvs/lvmetad. 2012-03-01 20:03:45 +00:00
Petr Rockai
823268475c Use 64 bit integers whenever extracting numbers from daemon replies. 2012-03-01 19:54:53 +00:00
Jonathan Earl Brassow
2ce9693341 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
2012-03-01 17:41:39 +00:00
Zdenek Kabelac
d17cd1c385 Missed ; 2012-03-01 10:46:39 +00:00
Zdenek Kabelac
310f54439c More useful debug message 2012-03-01 10:41:48 +00:00
Zdenek Kabelac
c219934a87 Add _rimage as reserved suffix 2012-03-01 10:39:21 +00:00
Zdenek Kabelac
84e16ecdb5 Add cast for ptrdiff_t - cleanup gcc warning 2012-03-01 10:31:35 +00:00
Zdenek Kabelac
3bd9048854 Improve error logging
Log errors instead of plain return 0.
Check for f->private strdup result.
2012-03-01 10:30:48 +00:00
Zdenek Kabelac
f874903a35 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.
2012-03-01 10:09:36 +00:00
Zdenek Kabelac
521ddeaecc 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.
2012-03-01 10:07:38 +00:00
Zdenek Kabelac
f9467799c1 Check for allocation error
return ENOMEM when malloc fails.
2012-03-01 09:54:23 +00:00
Zdenek Kabelac
ce1c28af19 Log fail of pthread_join
Syslog error outside of mutex section.
2012-03-01 09:50:04 +00:00
Zdenek Kabelac
2455ce226d Fix leak of FID structure 2012-03-01 09:46:38 +00:00
Zdenek Kabelac
24ab6328f7 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).
2012-02-29 22:08:57 +00:00
Jonathan Earl Brassow
62e38da133 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.
2012-02-29 21:15:34 +00:00