Zdenek Kabelac
166597d998
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
250238d04c
Log error from unlink failure
2010-12-01 12:41:49 +00:00
Zdenek Kabelac
5bd1cb414b
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
062181292a
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
e3552d738c
Check result of vginfo_from_vgname
...
Check for some potential internal error.
2010-12-01 10:39:28 +00:00
Zdenek Kabelac
1d2f212a3d
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
2937b51eaa
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
c8c4eda71f
What's new.
2010-11-30 23:03:35 +00:00
Zdenek Kabelac
bf8ea32876
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
973db2a823
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
8865a4c19e
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
5b8abb1240
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
81e606ab2c
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
14caa4a2d0
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
a8d4cd68eb
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
41cf252f0b
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
8191fe4f4a
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
0669d21847
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
97e8048e05
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
1415afcdba
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
2e3be4f3fd
Optimize lookup table read
...
Reread lookup table only when needed.
2010-11-29 14:25:13 +00:00
Zdenek Kabelac
b20e74d5d6
Remove dead assignment in wait_for_child
...
'pid' is not used anywhere - remove it.
2010-11-29 12:44:52 +00:00
Zdenek Kabelac
4cb0f557d9
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
5f3325fcf1
Remove dead assignment in _mirror_emit_segment_line
...
Remove unused 'r' assignment.
2010-11-29 12:42:10 +00:00
Zdenek Kabelac
21ba805499
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
693ec4b404
Use one fprintf call for usage print
...
Replace multiple fprintf calls with multiline one.
2010-11-29 12:15:41 +00:00
Zdenek Kabelac
cbecd3cd11
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
2e8d681cf2
Remove dead assignment in 'main'
...
'ret' is never read anywhere - remove it.
2010-11-29 11:23:14 +00:00
Zdenek Kabelac
dce59eb407
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
a8cc07b564
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
73e3226012
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
201222ebad
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
1b88184104
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
99aacef51c
Fix check for empty system_dir
...
Fixing check for zero length system_dir string.
2010-11-29 10:58:32 +00:00
Zdenek Kabelac
8661190736
Cleanup remove test for NULL
...
dm_free is testing NULL itself
2010-11-29 10:11:50 +00:00
Mike Snitzer
a2f5ce8181
Fix "it's" typo to be "its" in lvconvert error message.
2010-11-28 18:37:33 +00:00
Petr Rockai
964916f8f3
Update WHATS_NEW.
2010-11-25 17:16:41 +00:00
Petr Rockai
a680e90fb0
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
0bc382eae4
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
f2afa4f21d
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
5219fe3ca8
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
14b0c96bc7
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
46f84d5cb9
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
9d6d98c900
Fix memory leak in error path
...
Release allocated path buffer in error path.
2010-11-24 09:43:18 +00:00
Zdenek Kabelac
e8ec0ba2e3
Fix resource leak of dlopened pointer
...
Add missing dlclose in _init_formats() error path.
Use return_0 to print stack trace from the call.
2010-11-24 09:34:34 +00:00
Zdenek Kabelac
2044eacc7e
Add missing fclose
...
Fixing resource leak in _umount().
CHECKME: mountpoints with spaces need to be checked
2010-11-23 21:19:45 +00:00
Zdenek Kabelac
aaa7f4c966
Move arg_vgnames from local scope
...
As gcc puts probably all vars on stack this bug was not noticed in runtime.
Patch fixes referencing local scope list variable.
2010-11-23 20:39:13 +00:00
Zdenek Kabelac
f46de65682
Do not call dm_task_destroy with NULL
2010-11-23 18:29:06 +00:00
Zdenek Kabelac
0a178d853a
Add missing closedir() - fixes resource leak
2010-11-23 15:28:54 +00:00
Zdenek Kabelac
7d11d708d8
Move va_end() so it is also used before error path return
2010-11-23 15:08:57 +00:00