Zdenek Kabelac
e922a85c51
Test alloc fail
2012-03-01 21:49:32 +00:00
Zdenek Kabelac
f996955304
Log sys error for lseek
2012-03-01 21:19:20 +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
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
Petr Rockai
d84d5b113e
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
6732bedecb
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
041c69362d
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
53bdfe124b
Fix leak of FID structure
2012-03-01 09:46:38 +00:00
Zdenek Kabelac
052269aa2c
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
50bdd70043
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
6508cc6805
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
942144f4a3
Fix a whitespace bug in the last checkin.
2012-02-29 00:19:14 +00:00
Petr Rockai
ce80d6e401
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
ba23f9e71f
Reflect new file locations, include file updates etc.
2012-02-28 18:35:04 +00:00
Alasdair Kergon
b10489f568
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
0c598c8270
Bypass lvmetad fns when not configured to use lvmetad.
2012-02-28 18:22:52 +00:00
Alasdair Kergon
d7d948eacc
Add LVMETAD_SUPPORT
2012-02-28 18:20:58 +00:00
Alasdair Kergon
dea586a587
If lvmetad fails, don't set _has_scanned
2012-02-28 18:20:17 +00:00
Zdenek Kabelac
f2cbcb027e
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
7ed8790301
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
a22be5e2e9
Test dm_hash_insert() failures mem failures
2012-02-28 11:12:58 +00:00
Zdenek Kabelac
0098904026
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
c0d7975bb2
Check result of export_vg_to_buffer
...
and avoid usage of failed buffer.
2012-02-28 11:09:06 +00:00
Zdenek Kabelac
22266ea325
Add stacktrace for init_lvmcache_orphans fail path
2012-02-28 11:08:04 +00:00
Zdenek Kabelac
fdc31c7a8a
Add some stack traces for dev_close error paths
2012-02-28 10:11:35 +00:00
Zdenek Kabelac
535fbc2256
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
9cdfa9e854
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
cd1f056f20
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
faf8ad30f1
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
4960a3c7f3
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
3b45ebe86b
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
d7bb0d77aa
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
125456bb3e
Add some log_sys_errors to close() call
2012-02-27 11:28:47 +00:00
Zdenek Kabelac
4f443a0d0c
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
0027de97c9
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
061b3169f9
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
edb0de6539
Test result of _init_tags.
2012-02-27 10:05:35 +00:00
Zdenek Kabelac
fe84afbbab
Check allocation result
2012-02-27 09:56:27 +00:00
Zdenek Kabelac
9b0c352a57
Remove test for pvid
...
Since pvid is char buffer[] and not pointer,
there is no point to check it for NULL.
2012-02-27 09:54:25 +00:00
Zdenek Kabelac
c1a04f0fe3
Ignore result of unlock explicitely
2012-02-27 09:52:37 +00:00
Zdenek Kabelac
42c3f42474
Just reindent with tabs
2012-02-27 09:51:31 +00:00
Petr Rockai
c401303ca2
Fix a possible SEGV in lvmetad client code, and a minor leak in pvscan
...
--lvmetad.
2012-02-26 13:42:50 +00:00
Petr Rockai
9656be3deb
A bit of documentation for lvmetad_vg_lookup.
2012-02-26 08:50:13 +00:00
Petr Rockai
e91a7700eb
- Improve error reporting on lvmetad connection failure.
...
- Fix a couple of memory leaks in the lvmetad client code.
- Avoid an error in lvmetad_pv_gone when we aren't using lvmetad.
2012-02-26 08:49:40 +00:00
Zdenek Kabelac
aa558eaeb8
Use const for lv
...
lv_is_active doesn't needs modifiable LV struct so keep it const.
Remove lv_send_message() left bits from code -
they were never released in 2.02.89.
2012-02-23 22:41:57 +00:00
Zdenek Kabelac
33f24144bd
Drop const modifier from fb
...
It's not useful here to use const - since we need non-const value for unmap.
Also remove now unneeded cast.
2012-02-23 22:36:21 +00:00
Zdenek Kabelac
751e17f17b
Add explicit cast for time() ret value
...
To keep all numbers with same sign
2012-02-23 22:31:23 +00:00
Zdenek Kabelac
2237e93169
Use same signed numbers
...
Keep unsigned aritmetic.
TODO: we should probably switch dm_split_words() to return unsigned numbers.
(minor API libdm change mostly compatible)
2012-02-23 22:30:20 +00:00
Zdenek Kabelac
19fde08c6a
Drop backtrace after log_error
...
Just a minor change to not give backtrace when log_error has been just
reported.
2012-02-23 22:24:47 +00:00
Zdenek Kabelac
b2edbee763
Remaing code suffling
...
Move declaration to the front of function to follow coding rules.
2012-02-23 22:23:12 +00:00