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

2852 Commits

Author SHA1 Message Date
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
Zdenek Kabelac
d13b5db28e Add stacktrace for init_lvmcache_orphans fail path 2012-02-28 11:08:04 +00:00
Zdenek Kabelac
a46cc72fd2 Add some stack traces for dev_close error paths 2012-02-28 10:11:35 +00:00
Zdenek Kabelac
89bce34cfb Explicitely ignore errors in label_read iteration.
We don't want stack traces here, so mark as void.
2012-02-28 10:10:07 +00:00
Zdenek Kabelac
0475b86268 Explicitely check list size of segments
instead of checking for NULL from last_seg and first_seg.
2012-02-28 10:08:20 +00:00
Zdenek Kabelac
f380cd7d98 Use unsigned type for bitmask
Using report_type_t for bitmask is not correct, since we have not defined types
for all  bit combinations - so switching to unsigned type, since values of
report_type_t enum are unsigned.
2012-02-27 11:45:05 +00:00
Zdenek Kabelac
d2a3352755 Just code move of hash initialization in front of function
Make sure both hash tables are initialized before _read_sections() call.
Presents no functional change (since PV scan phase was not adding LV hashes),
but makes the code easier to handle mem failing case, and static analyzer is
hapier as well.
2012-02-27 11:40:58 +00:00
Zdenek Kabelac
b9141fcefa Add stack traces for lock_vol failures
Adding at least stack traces with some FIXMEs for cases,
where we might want to do something cleaver - maybe fail command
or give user hints something is not going well ?

For remote_backup is stack probably 'good' enough for now.
2012-02-27 11:35:59 +00:00
Zdenek Kabelac
a68f04f41c Check id_write_format result
Currently we never fail with 64byte uuid buffer,
but just stay consitent with rest of the code and check for result.
2012-02-27 11:32:48 +00:00
Zdenek Kabelac
c5b8faf3b1 Explicitely ignore fail error on hash_insert
We cannot do anything better here anyway - we are already in logging function,
so just ignore this issue here - it will most likely stop application later.
2012-02-27 11:31:30 +00:00
Zdenek Kabelac
8918bf2430 Add some log_sys_errors to close() call 2012-02-27 11:28:47 +00:00
Zdenek Kabelac
530efdb525 Check for vg_name existance
Since vg_read() mda ops could be called with NULL vg_name,
check it before derefence also for pool and format1.
2012-02-27 11:23:15 +00:00
Zdenek Kabelac
9737943c4c Fix missing break
Bug introduced with addition of internal error default case.
Seem like this code is not used.
TODO: add coverage test.
2012-02-27 11:13:48 +00:00
Zdenek Kabelac
e1153fd385 Test seg pointer for non-null
As the function accepts NULL for 'seg' parameter,
check for it before dereference.
2012-02-27 10:15:08 +00:00
Zdenek Kabelac
3af1ebe31e Test result of _init_tags. 2012-02-27 10:05:35 +00:00