]>
sourceware.org Git - lvm2.git/log
Zdenek Kabelac [Mon, 20 Dec 2010 14:05:31 +0000 (14:05 +0000)]
Remove unused variable dev_dir_provided
Zdenek Kabelac [Mon, 20 Dec 2010 14:04:43 +0000 (14:04 +0000)]
Remove dead assignment of segh
Variable 'segh' is never read again after this assignment.
Zdenek Kabelac [Mon, 20 Dec 2010 13:59:52 +0000 (13:59 +0000)]
Remove dead store in lvm_run_command
Variable 'ret' is not read before its next assignment.
Zdenek Kabelac [Mon, 20 Dec 2010 13:58:38 +0000 (13:58 +0000)]
Removed unused pointer
Pointer 'duplicate' is unused.
Zdenek Kabelac [Mon, 20 Dec 2010 13:57:19 +0000 (13:57 +0000)]
Use dm_free for dm_malloc-ed areas in _clog_ctr/_clog_dtr (cmirrord).
Use dm_zalloc to obtain zeroed memory block.
Use dm_free for dm_ allocated memory blocks.
Test close() for error.
Zdenek Kabelac [Mon, 20 Dec 2010 13:53:10 +0000 (13:53 +0000)]
Add checks for allocation errors in config node clonning.
Add checks for clonning allocation a fail-out when something is
not allocated correctly.
Also move var declaration to the begining of the function
and fix log_error messages.
Zdenek Kabelac [Mon, 20 Dec 2010 13:48:28 +0000 (13:48 +0000)]
Replace multiple fprintf calls with one large string parameter
Zdenek Kabelac [Mon, 20 Dec 2010 13:45:39 +0000 (13:45 +0000)]
Fix error path if regex engine cannot be created in _build_matcher().
Fix only 'stack' printing with full function error exit.
Zdenek Kabelac [Mon, 20 Dec 2010 13:40:46 +0000 (13:40 +0000)]
Use const char * for name and old_name in vg
Switch to use const char pointers to avoid changes of these structure
members and having better control over, were these members could
be modified.
Zdenek Kabelac [Mon, 20 Dec 2010 13:39:12 +0000 (13:39 +0000)]
Use const char* for offset calculation
As 'const' types are also passed to macro dm_list_struct_base -
keep offset calculation with const char pointers.
Fixes several gcc constness warnings.
Zdenek Kabelac [Mon, 20 Dec 2010 13:37:26 +0000 (13:37 +0000)]
Switch void* to char* arithmetic
Zdenek Kabelac [Mon, 20 Dec 2010 13:32:49 +0000 (13:32 +0000)]
Remove const usage from destroy callbacks
As const segment_type or const format_type are never released
use their non-const version and remove const downcast from dm_free calls.
This change fixes many gcc warnings we were getting from them.
Zdenek Kabelac [Mon, 20 Dec 2010 13:28:04 +0000 (13:28 +0000)]
Fix wrong cast to char*
As cmd->cmd_line is already const char pointer it's not needed to cast already
const char pointer to char pointer.
Zdenek Kabelac [Mon, 20 Dec 2010 13:23:11 +0000 (13:23 +0000)]
Use const char* const * for dm_regex_create()
Change API interface to accept even completely const array patterns.
This should present no change for libdm users and allows to pass
pattern arrays without cast to const char **.
Zdenek Kabelac [Mon, 20 Dec 2010 13:19:13 +0000 (13:19 +0000)]
Some const cleanups
Minor const warning fixes and internal API updates.
Zdenek Kabelac [Mon, 20 Dec 2010 13:17:56 +0000 (13:17 +0000)]
update
Zdenek Kabelac [Mon, 20 Dec 2010 13:16:30 +0000 (13:16 +0000)]
Test return value from read() and close() for an error.
Zdenek Kabelac [Mon, 20 Dec 2010 13:12:55 +0000 (13:12 +0000)]
Add more strict const pointers around config tree
To have better control were the config tree could be modified use more
const pointers and very carefully downcast them back to non-const
(for config tree merge).
Zdenek Kabelac [Mon, 20 Dec 2010 12:29:39 +0000 (12:29 +0000)]
Move var declarations to function begining
As assert macro jumps to 'bad:' label - we need vg initialized.
Zdenek Kabelac [Fri, 17 Dec 2010 12:37:49 +0000 (12:37 +0000)]
Fix NULL pointer check for *buf
As ternary operator has lower priority then add operation, this check
was not doing what seemed to be expected.
So enclose the test in braces and check for NULL in *buf.
Alasdair Kergon [Wed, 15 Dec 2010 12:49:55 +0000 (12:49 +0000)]
Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51) (robbat2)
Petr Rockai [Tue, 14 Dec 2010 23:23:45 +0000 (23:23 +0000)]
Fix sed substitution in copying tests to builddir (test/Makefile.in).
Petr Rockai [Tue, 14 Dec 2010 23:20:58 +0000 (23:20 +0000)]
Add getters for copy_percent and snap_percent to the lvm2app API.
Petr Rockai [Tue, 14 Dec 2010 17:51:09 +0000 (17:51 +0000)]
Add further consistency checking to vg_validate, ensuring that all segment
areas point to LVs or PVs that are listed in the respective VG.
Petr Rockai [Tue, 14 Dec 2010 17:38:42 +0000 (17:38 +0000)]
Hack up the RUN_BASE computation in the test Makefile.in a bit more (so that it
actually works... sometimes).
Petr Rockai [Tue, 14 Dec 2010 17:07:35 +0000 (17:07 +0000)]
Add a validation step for pvmoveN internal LVs to vg_validate.
Peter Rajnoha [Mon, 13 Dec 2010 12:44:09 +0000 (12:44 +0000)]
HAVE_SELINUX again
Peter Rajnoha [Mon, 13 Dec 2010 12:30:04 +0000 (12:30 +0000)]
#ifdef HAVE_SELINUX and #ifdef HAVE_SELINUX_LABEL_H
Peter Rajnoha [Mon, 13 Dec 2010 12:18:38 +0000 (12:18 +0000)]
Missing #elif HAVE_SELINUX
Milan Broz [Mon, 13 Dec 2010 11:03:10 +0000 (11:03 +0000)]
Update configure.
Peter Rajnoha [Mon, 13 Dec 2010 10:49:02 +0000 (10:49 +0000)]
Create /var/run/lvm directory during clvmd initialisation if missing.
We need to be sure that /var/run and /var/lock is always there.
(E.g. these two directories could be using tmpfs which then loose
all the content after reboot.)
Peter Rajnoha [Mon, 13 Dec 2010 10:43:56 +0000 (10:43 +0000)]
Add new dm_prepare_selinux_context fn to libdevmapper and use it throughout.
Detect existence of new SELinux selabel interface during configure.
Use new dm_prepare_selinux_context instead of dm_set_selinux_context.
We should set the SELinux context before the actual file system object creation.
The new dm_prepare_selinux_context function sets this using the selabel_lookup
fn in conjuction with the setfscreatecon fn. If selinux/label.h interface
(that should be a part of the selinux library) is not found during configure,
we fallback to the original matchpathcon function instead.
Petr Rockai [Sun, 12 Dec 2010 22:26:47 +0000 (22:26 +0000)]
Remove a redundant %.o: %.c rule from test/api/Makefile.in.
Petr Rockai [Sun, 12 Dec 2010 21:17:25 +0000 (21:17 +0000)]
Fix the sed expression to get "base" names of tests.
Petr Rockai [Sun, 12 Dec 2010 21:08:00 +0000 (21:08 +0000)]
Only build the required bits under api/ on make check.
Petr Rockai [Sun, 12 Dec 2010 20:49:38 +0000 (20:49 +0000)]
Do not build vgtest (superseded by vgtest.t). Fix the build line for .t files.
Petr Rockai [Sun, 12 Dec 2010 20:36:38 +0000 (20:36 +0000)]
First go at a somewhat more comprehensive mechanism to run "unit" tests for the
lvm2app API. Further factoring of the support code needed. RHBZ 654445
Alasdair Kergon [Fri, 10 Dec 2010 22:39:52 +0000 (22:39 +0000)]
Fix scanning of VGs without in-PV mdas.
Set cmd->independent_metadata_areas if metadata/dirs or disk_areas in use.
- Identify and record this state.
Don't skip full scan when independent mdas are present even if memlock is set.
- Clusters and OOM aren't supported, so no problem doing the proper scans.
Avoid revalidating the label cache immediately after scanning.
- A simple optimisation.
Support scanning for a single VG in independent mdas.
- Not used by the fix but I left it in anyway as later patches might use it.
Milan Broz [Thu, 9 Dec 2010 11:19:21 +0000 (11:19 +0000)]
Try to detect fail in clvmd startup in tests.
Alasdair Kergon [Thu, 9 Dec 2010 00:10:24 +0000 (00:10 +0000)]
.
Alasdair Kergon [Wed, 8 Dec 2010 23:09:45 +0000 (23:09 +0000)]
.
Alasdair Kergon [Wed, 8 Dec 2010 20:50:48 +0000 (20:50 +0000)]
Rename vg_release to free_vg.
Alasdair Kergon [Wed, 8 Dec 2010 19:26:35 +0000 (19:26 +0000)]
Cope better with an undefined target_percent operation in _percent_run.
Zdenek Kabelac [Wed, 8 Dec 2010 10:45:37 +0000 (10:45 +0000)]
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.
Alasdair Kergon [Mon, 6 Dec 2010 22:13:10 +0000 (22:13 +0000)]
post-release
Alasdair Kergon [Mon, 6 Dec 2010 17:57:14 +0000 (17:57 +0000)]
pre-release
Alasdair Kergon [Mon, 6 Dec 2010 17:37:09 +0000 (17:37 +0000)]
Fix debug logging of derived flag LCK_CACHE in clvmd.
Zdenek Kabelac [Wed, 1 Dec 2010 13:05:06 +0000 (13:05 +0000)]
Check str_list_add() success
Report error if str_list_add fails.
Zdenek Kabelac [Wed, 1 Dec 2010 13:01:36 +0000 (13:01 +0000)]
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.
Zdenek Kabelac [Wed, 1 Dec 2010 12:56:39 +0000 (12:56 +0000)]
Add backtraces for errors
Add stack; backtraces when error is reported from dev_set() or
dev_close_immediate().
Zdenek Kabelac [Wed, 1 Dec 2010 12:41:49 +0000 (12:41 +0000)]
Log error from unlink failure
Zdenek Kabelac [Wed, 1 Dec 2010 12:22:49 +0000 (12:22 +0000)]
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.
Zdenek Kabelac [Wed, 1 Dec 2010 10:46:20 +0000 (10:46 +0000)]
Add logging for pipe write() and close() error
Check values from write() and close() system calls.
FIXME: Missing wrapper around 'write()'.
Zdenek Kabelac [Wed, 1 Dec 2010 10:39:28 +0000 (10:39 +0000)]
Check result of vginfo_from_vgname
Check for some potential internal error.
Zdenek Kabelac [Wed, 1 Dec 2010 10:36:25 +0000 (10:36 +0000)]
Optimize second call to strchr with same parameters
Small optimalization - reusing already known strchr result.
Zdenek Kabelac [Wed, 1 Dec 2010 10:33:55 +0000 (10:33 +0000)]
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.
Petr Rockai [Tue, 30 Nov 2010 23:03:35 +0000 (23:03 +0000)]
What's new.
Zdenek Kabelac [Tue, 30 Nov 2010 22:57:35 +0000 (22:57 +0000)]
Remove unneeded test for NULL
Remove check for system_id (it is defined as int8_t[], so cannot be NULL).
Zdenek Kabelac [Tue, 30 Nov 2010 22:53:37 +0000 (22:53 +0000)]
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.
Zdenek Kabelac [Tue, 30 Nov 2010 22:40:19 +0000 (22:40 +0000)]
Add stack trace for error path
If dm_task_set_cookie() fails print stack trace, but keep going on.
Zdenek Kabelac [Tue, 30 Nov 2010 22:32:44 +0000 (22:32 +0000)]
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.
Zdenek Kabelac [Tue, 30 Nov 2010 22:28:06 +0000 (22:28 +0000)]
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.
Zdenek Kabelac [Tue, 30 Nov 2010 22:23:35 +0000 (22:23 +0000)]
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.
Zdenek Kabelac [Tue, 30 Nov 2010 22:16:25 +0000 (22:16 +0000)]
Replace snprintf with dm_snprintf
Use dm_snprintf with known error case return code (-1).
Zdenek Kabelac [Tue, 30 Nov 2010 22:11:26 +0000 (22:11 +0000)]
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)
Petr Rockai [Tue, 30 Nov 2010 11:53:31 +0000 (11:53 +0000)]
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.
Petr Rockai [Tue, 30 Nov 2010 11:35:32 +0000 (11:35 +0000)]
Fix a failing test (it used a combination of lvconvert parameters that is no
longer permitted.)
Petr Rockai [Tue, 30 Nov 2010 11:15:54 +0000 (11:15 +0000)]
Avoid the automatic MISSING_PV recovery path in commands with special
MISSING_PV handling (cmd->handles_missing_pvs is set).
Alasdair Kergon [Mon, 29 Nov 2010 18:35:37 +0000 (18:35 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 14:25:13 +0000 (14:25 +0000)]
Optimize lookup table read
Reread lookup table only when needed.
Zdenek Kabelac [Mon, 29 Nov 2010 12:44:52 +0000 (12:44 +0000)]
Remove dead assignment in wait_for_child
'pid' is not used anywhere - remove it.
Zdenek Kabelac [Mon, 29 Nov 2010 12:43:49 +0000 (12:43 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 12:42:10 +0000 (12:42 +0000)]
Remove dead assignment in _mirror_emit_segment_line
Remove unused 'r' assignment.
Zdenek Kabelac [Mon, 29 Nov 2010 12:19:58 +0000 (12:19 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 12:15:41 +0000 (12:15 +0000)]
Use one fprintf call for usage print
Replace multiple fprintf calls with multiline one.
Zdenek Kabelac [Mon, 29 Nov 2010 11:26:00 +0000 (11:26 +0000)]
Remove dead assignment in dm_tree_node_add_mirror_target_log
'seg' is never used - remove it.
Zdenek Kabelac [Mon, 29 Nov 2010 11:23:14 +0000 (11:23 +0000)]
Remove dead assignment in 'main'
'ret' is never read anywhere - remove it.
Zdenek Kabelac [Mon, 29 Nov 2010 11:16:58 +0000 (11:16 +0000)]
Remove unused 'i' in _pv_analyze_mda_raw
'i' is unused in the function - remove it.
Zdenek Kabelac [Mon, 29 Nov 2010 11:14:33 +0000 (11:14 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 11:13:12 +0000 (11:13 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 11:08:14 +0000 (11:08 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 11:05:15 +0000 (11:05 +0000)]
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.
Zdenek Kabelac [Mon, 29 Nov 2010 10:58:32 +0000 (10:58 +0000)]
Fix check for empty system_dir
Fixing check for zero length system_dir string.
Zdenek Kabelac [Mon, 29 Nov 2010 10:11:50 +0000 (10:11 +0000)]
Cleanup remove test for NULL
dm_free is testing NULL itself
Mike Snitzer [Sun, 28 Nov 2010 18:37:33 +0000 (18:37 +0000)]
Fix "it's" typo to be "its" in lvconvert error message.
Petr Rockai [Thu, 25 Nov 2010 17:16:41 +0000 (17:16 +0000)]
Update WHATS_NEW.
Petr Rockai [Thu, 25 Nov 2010 17:15:46 +0000 (17:15 +0000)]
Disallow certain lvconvert operations that need to both allocate and free
extents, while physical volumes are specified. Fixes BZ 640051.
Petr Rockai [Thu, 25 Nov 2010 14:39:02 +0000 (14:39 +0000)]
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>
Petr Rockai [Thu, 25 Nov 2010 14:35:46 +0000 (14:35 +0000)]
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>
Petr Rockai [Thu, 25 Nov 2010 14:34:51 +0000 (14:34 +0000)]
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>
Petr Rockai [Thu, 25 Nov 2010 14:33:44 +0000 (14:33 +0000)]
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>
Zdenek Kabelac [Wed, 24 Nov 2010 09:53:31 +0000 (09:53 +0000)]
Add missing destrustion of cmd_context
Lvm1 fallback code missed to destroy cmd_context in error path.
Zdenek Kabelac [Wed, 24 Nov 2010 09:43:18 +0000 (09:43 +0000)]
Fix memory leak in error path
Release allocated path buffer in error path.
Zdenek Kabelac [Wed, 24 Nov 2010 09:34:34 +0000 (09:34 +0000)]
Fix resource leak of dlopened pointer
Add missing dlclose in _init_formats() error path.
Use return_0 to print stack trace from the call.
Zdenek Kabelac [Tue, 23 Nov 2010 21:19:45 +0000 (21:19 +0000)]
Add missing fclose
Fixing resource leak in _umount().
CHECKME: mountpoints with spaces need to be checked
Zdenek Kabelac [Tue, 23 Nov 2010 20:39:13 +0000 (20:39 +0000)]
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.
Zdenek Kabelac [Tue, 23 Nov 2010 18:29:06 +0000 (18:29 +0000)]
Do not call dm_task_destroy with NULL
Zdenek Kabelac [Tue, 23 Nov 2010 15:28:54 +0000 (15:28 +0000)]
Add missing closedir() - fixes resource leak
Zdenek Kabelac [Tue, 23 Nov 2010 15:08:57 +0000 (15:08 +0000)]
Move va_end() so it is also used before error path return
Zdenek Kabelac [Tue, 23 Nov 2010 15:00:52 +0000 (15:00 +0000)]
Move va_end(ap) so we do not leave with return -1 without calling it.
Remove unneeded ';'
This page took 0.068761 seconds and 5 git commands to generate.