Zdenek Kabelac
1e9221af45
Remove reset of vg->vgmem pointer as it is access of already release memory
...
This reset of vgmem pointer causes access of already released memory.
(_vg_make_handle allocates vg from vgmem pool itself - which is a bit tricky)
Interestingly this memory fault was missed by our test suite.
2010-12-08 10:45:37 +00:00
Alasdair Kergon
200675b506
post-release
2010-12-06 22:13:10 +00:00
Alasdair Kergon
6424bd9e6d
pre-release
2010-12-06 17:57:14 +00:00
Alasdair Kergon
7ce425114e
Fix debug logging of derived flag LCK_CACHE in clvmd.
2010-12-06 17:37:09 +00:00
Zdenek Kabelac
b0e9ba5f4b
Check str_list_add() success
...
Report error if str_list_add fails.
2010-12-01 13:05:06 +00:00
Zdenek Kabelac
7837f37e21
Check lv_info() success
...
Add log_error message for lv_info failure and exit from futher
processing.
Replace 'leg' occurence in debug message with 'image' which
is used in other messages.
2010-12-01 13:01:36 +00:00
Zdenek Kabelac
966bfcef27
Add backtraces for errors
...
Add stack; backtraces when error is reported from dev_set() or
dev_close_immediate().
2010-12-01 12:56:39 +00:00
Zdenek Kabelac
70ebb39097
Log error from unlink failure
2010-12-01 12:41:49 +00:00
Zdenek Kabelac
60d340b387
Test lv_name is not NULL
...
Patch adds extra check for lv_name not being NULL.
Test avoids unneeded strlen call for this case.
Otherwise there is no functional change as test would fail on
size_t comparation even for NULL lv_name (thus there is no risk
of NULL dereference when taking 'true' if branch.
2010-12-01 12:22:49 +00:00
Zdenek Kabelac
22812bc83c
Add logging for pipe write() and close() error
...
Check values from write() and close() system calls.
FIXME: Missing wrapper around 'write()'.
2010-12-01 10:46:20 +00:00
Zdenek Kabelac
83c37777f1
Check result of vginfo_from_vgname
...
Check for some potential internal error.
2010-12-01 10:39:28 +00:00
Zdenek Kabelac
a200f50bbe
Optimize second call to strchr with same parameters
...
Small optimalization - reusing already known strchr result.
2010-12-01 10:36:25 +00:00
Zdenek Kabelac
a2f563f84f
Fallback to full rescan for missing device
...
Fix bug when NULL could have been passsed as 'data'
to _add_pv_to_list() if 'dev' is NULL.
Now it fallbacks to complete scan.
2010-12-01 10:33:55 +00:00
Petr Rockai
d5c94a08a7
What's new.
2010-11-30 23:03:35 +00:00
Zdenek Kabelac
9fc47d67df
Remove unneeded test for NULL
...
Remove check for system_id (it is defined as int8_t[], so cannot be NULL).
2010-11-30 22:57:35 +00:00
Zdenek Kabelac
c697497923
Test uuid for NULL
...
Add test for NULL before passing uuid as src argument to memcpy.
As memcpy function is declared as function not accepting NULL.
Though we pass NULL only with zero length so this patch presents
no functional change to the code.
2010-11-30 22:53:37 +00:00
Zdenek Kabelac
b13837c2c0
Add stack trace for error path
...
If dm_task_set_cookie() fails print stack trace, but keep going on.
2010-11-30 22:40:19 +00:00
Zdenek Kabelac
5eb6300c77
Add error path stack traces
...
Check for errors from dm_task_set_name() and dm_task_run().
Add stack traces for error paths.
Return 0 if some error is found.
2010-11-30 22:32:44 +00:00
Zdenek Kabelac
a1b86401a5
Remove check for lv is NULL
...
'lv' is deferenced in the begining of the function so any check
later is not helpful.
Parameters for dev_manager_transien() are marked as nonnull.
2010-11-30 22:28:06 +00:00
Zdenek Kabelac
5dcb17df67
Add missing test for failed pool allocation
...
Add test for NULL from dm_poll_create.
Reorder dm_pool_destroy() before file close and add label out:.
Avoid leaking file descriptor if the allocation fails.
2010-11-30 22:23:35 +00:00
Zdenek Kabelac
5b94a87589
Replace snprintf with dm_snprintf
...
Use dm_snprintf with known error case return code (-1).
2010-11-30 22:16:25 +00:00
Zdenek Kabelac
3698ce35b1
Check reallocated buffer for NULL before use
...
As *buf is reallocated in case CLVMD_CMD_TEST: test for NULL is needed
before printing status.
(realloc() == NULL and status != 0)
2010-11-30 22:11:26 +00:00
Petr Rockai
e6ce16ae13
Refactor the percent (mirror sync, snapshot usage) handling code to use
...
fixed-point values instead of a combination of a float value and an enum.
2010-11-30 11:53:31 +00:00
Petr Rockai
7e8110ec50
Fix a failing test (it used a combination of lvconvert parameters that is no
...
longer permitted.)
2010-11-30 11:35:32 +00:00
Petr Rockai
482cef7121
Avoid the automatic MISSING_PV recovery path in commands with special
...
MISSING_PV handling (cmd->handles_missing_pvs is set).
2010-11-30 11:15:54 +00:00
Alasdair Kergon
3c3e95a5a8
Fix memory leak when VG allocation policy in metadata is invalid.
...
Ignore unrecognised allocation policy found in metadata instead of aborting.
Fix another missing vg_release() in _vg_read_by_vgid.
2010-11-29 18:35:37 +00:00
Zdenek Kabelac
e0a4b67e11
Optimize lookup table read
...
Reread lookup table only when needed.
2010-11-29 14:25:13 +00:00
Zdenek Kabelac
56c7200837
Remove dead assignment in wait_for_child
...
'pid' is not used anywhere - remove it.
2010-11-29 12:44:52 +00:00
Zdenek Kabelac
0381e82b54
Remove dead assignment in _step_matcher
...
'ns' is not used after this assignment and it is reassigned with the following
code, so dropping this assignment.
2010-11-29 12:43:49 +00:00
Zdenek Kabelac
28b075f78d
Remove dead assignment in _mirror_emit_segment_line
...
Remove unused 'r' assignment.
2010-11-29 12:42:10 +00:00
Zdenek Kabelac
4f4c217659
Fix memory leak in error path
...
Nicely hidden memory leak in outf macro error path.
This macro is using out_text() and does automagical return_0.
That would leak tag_buffer allocated memory.
As there was same code for tags output - create _out_tags() function.
2010-11-29 12:19:58 +00:00
Zdenek Kabelac
55d9104463
Use one fprintf call for usage print
...
Replace multiple fprintf calls with multiline one.
2010-11-29 12:15:41 +00:00
Zdenek Kabelac
be2679a691
Remove dead assignment in dm_tree_node_add_mirror_target_log
...
'seg' is never used - remove it.
2010-11-29 11:26:00 +00:00
Zdenek Kabelac
69281c1eab
Remove dead assignment in 'main'
...
'ret' is never read anywhere - remove it.
2010-11-29 11:23:14 +00:00
Zdenek Kabelac
ea249ebca7
Remove unused 'i' in _pv_analyze_mda_raw
...
'i' is unused in the function - remove it.
2010-11-29 11:16:58 +00:00
Zdenek Kabelac
e60fe35e6b
Remove dead assignment in lvm2_main
...
'alias' is not read again in this code path.
Also 'alias' is already equal to 0 in this place.
2010-11-29 11:14:33 +00:00
Zdenek Kabelac
a1945b9f12
Remove dead assignment in _lock_for_cluster
...
'saved_errno' is not read from this initialization and before its
usage is assigned again before _cluster_free_request() call.
2010-11-29 11:13:12 +00:00
Zdenek Kabelac
d41c8aed57
Reset vg pointer after release
...
Set vg to NULL after releasing it as the following memlock() test may
lead to goto for the second call of vg_release() with the already
released vg pointer.
2010-11-29 11:08:14 +00:00
Zdenek Kabelac
fbf215ade2
Remove printing of LCK_CACHE
...
LCK_CACHE is defined as 0x100 so it cannot be passed through
unsigned char parameter - remove it from the sprintf code.
If the LCK_CLUSTER should be printed here - lot of code need
to be reworked - so adding FIXME comment.
2010-11-29 11:05:15 +00:00
Zdenek Kabelac
5b679c060d
Fix check for empty system_dir
...
Fixing check for zero length system_dir string.
2010-11-29 10:58:32 +00:00
Zdenek Kabelac
acb88b5339
Cleanup remove test for NULL
...
dm_free is testing NULL itself
2010-11-29 10:11:50 +00:00
Mike Snitzer
c3d7df946e
Fix "it's" typo to be "its" in lvconvert error message.
2010-11-28 18:37:33 +00:00
Petr Rockai
1dea3b9fab
Update WHATS_NEW.
2010-11-25 17:16:41 +00:00
Petr Rockai
3801cb524c
Disallow certain lvconvert operations that need to both allocate and free
...
extents, while physical volumes are specified. Fixes BZ 640051.
2010-11-25 17:15:46 +00:00
Petr Rockai
001b2c264b
All 'size' values of lvm2app properties should be in bytes.
...
Fix 'seg_size' to return bytes.
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:39:02 +00:00
Petr Rockai
f1e5a95d89
Add interactive tests for functions to lookup a pv|lv by name|uuid.
...
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:35:46 +00:00
Petr Rockai
8779301c8d
This patch adds helpers to allow users to lookup a lv or pv handle by
...
uuid (given a vg_t of course).
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:34:51 +00:00
Petr Rockai
2ac0e8f989
This patch adds helpers to allow users to lookup a lv or pv handle by
...
name (given a vg_t of course).
Signed-off-by: Dave Wysochanski <wysochanski@pobox.com>
Reviewed-by: Petr Rockai <prockai@redhat.com>
2010-11-25 14:33:44 +00:00
Zdenek Kabelac
f912e2c887
Add missing destrustion of cmd_context
...
Lvm1 fallback code missed to destroy cmd_context in error path.
2010-11-24 09:53:31 +00:00
Zdenek Kabelac
732528e1c0
Fix memory leak in error path
...
Release allocated path buffer in error path.
2010-11-24 09:43:18 +00:00