1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

6815 Commits

Author SHA1 Message Date
Peter Rajnoha
0711a50005 Clean up internal mangling interface. 2012-03-05 12:40:34 +00:00
Zdenek Kabelac
913a0dbb3a 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.
2012-03-04 17:40:59 +00:00
Zdenek Kabelac
4600444786 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.
2012-03-04 17:36:23 +00:00
Zdenek Kabelac
24cbb72291 Remove part of FIXME
(and reindent a code below)
2012-03-04 16:05:42 +00:00
Zdenek Kabelac
bebbb5aff9 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.)
2012-03-04 16:04:52 +00:00
Zdenek Kabelac
e04c6e4972 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.
2012-03-04 16:02:19 +00:00
Zdenek Kabelac
3fb6ddf3ce Add FIXMEs
Processing loop needs some thinking
2012-03-04 15:58:31 +00:00
Zdenek Kabelac
301c011a92 Just make error message more clear
Make more obvious, the origin LV for snapshot must be active.
2012-03-04 15:57:27 +00:00
Alasdair Kergon
41b738c1e4 Scan all devices for lvmetad if 'pvscan --cache' used without device list. 2012-03-03 18:32:53 +00:00
Alasdair Kergon
e66e524898 Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGs
don't appear.
2012-03-03 17:12:21 +00:00
Alasdair Kergon
f723e0396e Reinstate accidentally-deleted line. 2012-03-03 17:03:20 +00:00
Alasdair Kergon
eed642e0b3 post-release 2012-03-03 02:08:37 +00:00
Alasdair Kergon
eb706b3106 . 2012-03-03 01:28:15 +00:00
Alasdair Kergon
9a26228d28 pre-release 2012-03-03 01:00:49 +00:00
Zdenek Kabelac
e18ea55fef 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.
2012-03-02 23:01:10 +00:00
Zdenek Kabelac
059ff7d5ff Just space moving
Don't leave space on EOL.
2012-03-02 22:58:23 +00:00
Zdenek Kabelac
00422596c1 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
d177da6b98 a fixme 2012-03-02 22:44:31 +00:00
Zdenek Kabelac
299b4751c2 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
7c47bdc5ec fix non-lvmetad pvscan macro 2012-03-02 21:50:02 +00:00
Zdenek Kabelac
6859106e2a 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
bfb8a95111 Purge remaining trim bits from code 2012-03-02 21:43:26 +00:00
Alasdair Kergon
1a002bbe59 missing reply frees 2012-03-02 21:24:37 +00:00
Alasdair Kergon
598134b8e7 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
cbc8dedafe 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
fdfa12d956 Change pvscan --lvmetad to pvscan --cache. 2012-03-02 18:09:46 +00:00
Zdenek Kabelac
34b6b9d0d7 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
197d0d4af6 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
e3e0811b67 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
7659a953a7 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
7e42a312ae Reinstate error if e.g. daemon comms fails. 2012-03-02 02:55:45 +00:00
Zdenek Kabelac
6aff7af424 Wait for mirror in sync
1s could be too short
2012-03-02 00:08:48 +00:00
Zdenek Kabelac
d61c67b52d Check for error from dup2
Do not take correct fd as error result.
2012-03-01 23:20:45 +00:00
Zdenek Kabelac
a18693e705 Add traceback for failpath 2012-03-01 22:55:21 +00:00
Zdenek Kabelac
59c71b93ad 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
526655301e 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
1eb1626f08 Improve logging
Use %m for strerror.
Switch to use 0 for fail return code.
2012-03-01 22:06:18 +00:00
Zdenek Kabelac
17c3bf7b22 Check pointer before deref in debug message 2012-03-01 21:58:55 +00:00
Zdenek Kabelac
d27834ff0a Explicitely ignore fail from this label_read 2012-03-01 21:57:43 +00:00
Zdenek Kabelac
d102667b6d 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
e922a85c51 Test alloc fail 2012-03-01 21:49:32 +00:00
Zdenek Kabelac
2236c69c42 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
a75b0d4ee6 Check for alloc error
Simplify segtype_str usage and check for NULL segtype.
2012-03-01 21:21:54 +00:00
Zdenek Kabelac
f996955304 Log sys error for lseek 2012-03-01 21:19:20 +00:00
Zdenek Kabelac
27088d51a2 Debug log for hold_lock failure 2012-03-01 21:18:38 +00:00
Zdenek Kabelac
73ef9a7eaa Log sys errors 2012-03-01 21:17:29 +00:00
Zdenek Kabelac
48073da2b8 Backtrace for failing drop_cached_metadata 2012-03-01 21:16:44 +00:00
Zdenek Kabelac
657826a255 Check for udev_get_dev_dir result
Don't use NULL return value.
2012-03-01 21:16:05 +00:00
Zdenek Kabelac
465fe71f6c 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
0b60d3a05e Few more close and dev_close trace
Adding (void) where we cannot really report an error.
2012-03-01 21:12:37 +00:00