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

2866 Commits

Author SHA1 Message Date
Zdenek Kabelac
0f2bbb8763 Removing call of release_vg(NULL)
Since we are in error path were vg must be always NULL,
skip call of release_vg() like we do in other places.
2012-03-12 14:43:12 +00:00
Zdenek Kabelac
e19271418c Using %u modifier to print unsigned values. 2012-03-12 14:41:42 +00:00
Zdenek Kabelac
0d3ce181e1 Better structure layout for device_info
Save some relocation entries and use directly char[].
Since we do not need yes more then 127 partitions per device, use just int8_t.
Move lvm_type_filter_destroy into local static function.
2012-03-12 14:40:41 +00:00
Zdenek Kabelac
78d8e56a8e Simplify error path code for filter initialization
Use 'int' counter.
Use 'bad' with goto_bad macro.
2012-03-12 14:35:57 +00:00
Zdenek Kabelac
aa9ebf4494 Switch to normal log_verbose message
Here it's not an error case - so do not push this message to stderr.
2012-03-12 14:18:28 +00:00
Zdenek Kabelac
f6632c1ef4 Fix error path for create_toolcontext
Never return unfinished toolcontext - since error path is hit on
various stages of initialization we cannot leave it partially uninitialized,
since we would need to spread many more test across the code for config_valid.
Instead return NULL and properly release udev library resources as well.
2012-03-12 14:15:04 +00:00
Alasdair Kergon
243a5ba90f re-word warnings to be clearer to user 2012-03-06 02:39:25 +00:00
Zdenek Kabelac
aeaec150c0 Some more missing supposedly 64bit operations.
Avoid use 32bit math for extent_size.
2012-03-05 15:05:24 +00:00
Zdenek Kabelac
90423c1200 Fit thin pool metadata into 128MB
If the lvcreate may decide some automagical values for a user,
try to keep the pool metadata size into 128MB range for optimal
perfomance (as suggested by Joe).

So if the pool metadata size and chunk_size were not specified,
try to select such values they would fit into 128MB size.
2012-03-05 14:19:13 +00:00
Zdenek Kabelac
975b5b42d2 Improve warning
Use thin_dump --repair suggestion in log error message
and use just warning on  deactivation path without repair info
(since node has been deactivated).

Also check whether there is not 16 args for thin_check configured.
2012-03-05 14:15:50 +00:00
Zdenek Kabelac
20c40a0807 Use 64bit math
Prevent 32bit overflow and resulting weird error reports when working
with TB sizes..
2012-03-05 14:12:57 +00:00
Zdenek Kabelac
d18c70b4df 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
01c62d8f9d 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
35216ca66c Scan all devices for lvmetad if 'pvscan --cache' used without device list. 2012-03-03 18:32:53 +00:00
Zdenek Kabelac
f194dabb09 Just space moving
Don't leave space on EOL.
2012-03-02 22:58:23 +00:00
Alasdair Kergon
8d2c7d28cc a fixme 2012-03-02 22:44:31 +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
Alasdair Kergon
d742cdf327 Change pvscan --lvmetad to pvscan --cache. 2012-03-02 18:09:46 +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
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
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
52f76a7682 Test alloc fail 2012-03-01 21:49:32 +00:00
Zdenek Kabelac
cf518842b4 Log sys error for lseek 2012-03-01 21:19:20 +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
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
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
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
Alasdair Kergon
5b613cff97 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.)
2012-02-29 02:35:35 +00:00
Petr Rockai
996fe0a836 Fix a whitespace bug in the last checkin. 2012-02-29 00:19:14 +00:00
Petr Rockai
059e87ce7b Attempt a fix for lvm shell accumulating copies of orphan PVs with each "pvs"
invocation.
2012-02-29 00:18:27 +00:00
Alasdair Kergon
7126d8c21b Reflect new file locations, include file updates etc. 2012-02-28 18:35:04 +00:00
Alasdair Kergon
5bba2cc74b Invert some return codes (which used to get ignored anyway) in cases when
lvmetad is not being used.
2012-02-28 18:23:56 +00:00
Alasdair Kergon
a73128132c Bypass lvmetad fns when not configured to use lvmetad. 2012-02-28 18:22:52 +00:00
Alasdair Kergon
2c806677ba Add LVMETAD_SUPPORT 2012-02-28 18:20:58 +00:00
Alasdair Kergon
03b18d96ad If lvmetad fails, don't set _has_scanned 2012-02-28 18:20:17 +00:00
Zdenek Kabelac
fbf6b89a84 Using enum types for enums
alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
2012-02-28 14:24:57 +00:00
Zdenek Kabelac
54b2aadf40 Revert free of allocated segtype
lvm_register_segtype takes ownership of segtype and call destructor
for it in error path.
2012-02-28 14:23:41 +00:00
Zdenek Kabelac
0650d875e8 Test dm_hash_insert() failures mem failures 2012-02-28 11:12:58 +00:00
Zdenek Kabelac
58afa3e7fb 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.
2012-02-28 11:10:45 +00:00
Zdenek Kabelac
dec6a245a9 Check result of export_vg_to_buffer
and avoid usage of failed buffer.
2012-02-28 11:09:06 +00:00