1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

5171 Commits

Author SHA1 Message Date
Petr Rockai
f56007d95f Use system assert in test/api/percent.c, for now. 2011-01-03 15:07:39 +00:00
Milan Broz
65599cfb58 Fix wrongly paired unlocking of global lock in pvchange. (2.02.66) 2010-12-23 14:23:30 +00:00
Zdenek Kabelac
39b2b95477 Remove check for existance of vg pointer
Checking for vg being != NULL in this place is not needed.
Pointer vg is already dereferced in this function above this code line.
Also this internal function _read_pv is always called with valid 'vg' pointer.
2010-12-22 15:44:09 +00:00
Zdenek Kabelac
e65561feae Add backtraces for backup and backup_remove fail paths 2010-12-22 15:36:41 +00:00
Zdenek Kabelac
2a2170efc0 Hide unused code into if 0
Make it obvious for lcov coverage and static analyzis we
are not interested in this piece of code.
2010-12-22 15:32:15 +00:00
Zdenek Kabelac
adb5fb90b1 Detect errors from dm_task_set calls
Check for errors in dm_task_set calls.
Use  goto_bad macro with stack trace.
Replace  label  failed: with bad:.
2010-12-22 15:28:44 +00:00
Zdenek Kabelac
ad9e16c198 Fix last pthread_join fix commit
Call for pthread_join() does not set errno value even though return values
looks like that. For now assign errno from return value and still use
strerror() to print some error message as this seems to be commonly used.

Add also log_sys_error() message for error close of local pipe.
2010-12-22 14:00:28 +00:00
Zdenek Kabelac
96a20ae9d4 Add backtraces for archive and backup_locally
If archive or back_locally fails - add stack trace.
2010-12-22 13:45:33 +00:00
Zdenek Kabelac
0cadf7ba66 Fix memory leak in debug mode of restart_clvmd() error path 2010-12-22 12:14:11 +00:00
Zdenek Kabelac
bb5ccf8869 Log error state from pthread_join operation
Value jstat is unused - so replace it with logging via log_sys_error().
2010-12-22 12:10:56 +00:00
Zdenek Kabelac
57d19b3f1b Remove dead assignment of lv_total and lv_capasity_total
Variables 'lv_total' and 'lv_capasity_total' are unused.
2010-12-22 12:06:54 +00:00
Alasdair Kergon
e45d947322 post-release 2010-12-21 21:08:51 +00:00
Alasdair Kergon
b44cdfc143 Copyright notices for new files. 2010-12-21 01:14:34 +00:00
Alasdair Kergon
385933819e pre-release 2010-12-21 01:08:29 +00:00
Zdenek Kabelac
58e3ba19a2 Add missing test for reallocation error. 2010-12-20 14:38:22 +00:00
Zdenek Kabelac
0f3ab63a24 Remove dead assignment
Variable 'r' is never read so remove it and just cast result from
_error_device function to (void).
2010-12-20 14:36:12 +00:00
Zdenek Kabelac
2697eddcba Verbose log old_umask value
Use old_umask value and print its content through verbose log.
2010-12-20 14:34:49 +00:00
Zdenek Kabelac
90ba925a19 Add internal error if pointer is uninitialized
Add simple check for existance of 'pl' and printer internal error message
if device is missing instead of plain crash.
2010-12-20 14:20:52 +00:00
Zdenek Kabelac
b5d23f1591 Add check for unlink errors 2010-12-20 14:08:46 +00:00
Zdenek Kabelac
e6f0290d9f Remove unused variable label
Variable 'label' is unused in _format1_pv_write().
2010-12-20 14:06:33 +00:00
Zdenek Kabelac
23a3de988f Remove unused variable dev_dir_provided 2010-12-20 14:05:31 +00:00
Zdenek Kabelac
c4fc6c2381 Remove dead assignment of segh
Variable 'segh' is never read again after this assignment.
2010-12-20 14:04:43 +00:00
Zdenek Kabelac
9bc24aea56 Remove dead store in lvm_run_command
Variable 'ret' is not read before its next assignment.
2010-12-20 13:59:52 +00:00
Zdenek Kabelac
8392d2853e Removed unused pointer
Pointer 'duplicate' is unused.
2010-12-20 13:58:38 +00:00
Zdenek Kabelac
28708849a9 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.
2010-12-20 13:57:19 +00:00
Zdenek Kabelac
9f1538687a 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.
2010-12-20 13:53:10 +00:00
Zdenek Kabelac
0ae26564ce Replace multiple fprintf calls with one large string parameter 2010-12-20 13:48:28 +00:00
Zdenek Kabelac
9c146b8a6f Fix error path if regex engine cannot be created in _build_matcher().
Fix only 'stack' printing with full function error exit.
2010-12-20 13:45:39 +00:00
Zdenek Kabelac
2913ac8b4e 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.
2010-12-20 13:40:46 +00:00
Zdenek Kabelac
6556fcc3fc 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.
2010-12-20 13:39:12 +00:00
Zdenek Kabelac
1c6b3062bf Switch void* to char* arithmetic 2010-12-20 13:37:26 +00:00
Zdenek Kabelac
b00600c247 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.
2010-12-20 13:32:49 +00:00
Zdenek Kabelac
97d680c924 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.
2010-12-20 13:28:04 +00:00
Zdenek Kabelac
8f606cf0f6 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 **.
2010-12-20 13:23:11 +00:00
Zdenek Kabelac
c05aa13dcf Some const cleanups
Minor const warning fixes and internal API updates.
2010-12-20 13:19:13 +00:00
Zdenek Kabelac
12389f2089 update 2010-12-20 13:17:56 +00:00
Zdenek Kabelac
b3cb194c03 Test return value from read() and close() for an error. 2010-12-20 13:16:30 +00:00
Zdenek Kabelac
1ea4c6d449 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).
2010-12-20 13:12:55 +00:00
Zdenek Kabelac
e5526cb27e Move var declarations to function begining
As assert macro jumps to 'bad:' label - we need vg initialized.
2010-12-20 12:29:39 +00:00
Zdenek Kabelac
8a8a182679 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.
2010-12-17 12:37:49 +00:00
Alasdair Kergon
2f19cff4df Fix device.c #include to ensure 64-bit fopen64 use. (2.02.51) (robbat2) 2010-12-15 12:49:55 +00:00
Petr Rockai
0bceef8c78 Fix sed substitution in copying tests to builddir (test/Makefile.in). 2010-12-14 23:23:45 +00:00
Petr Rockai
40eee88b06 Add getters for copy_percent and snap_percent to the lvm2app API. 2010-12-14 23:20:58 +00:00
Petr Rockai
0c79543cfe Add further consistency checking to vg_validate, ensuring that all segment
areas point to LVs or PVs that are listed in the respective VG.
2010-12-14 17:51:09 +00:00
Petr Rockai
6ea66f6925 Hack up the RUN_BASE computation in the test Makefile.in a bit more (so that it
actually works... sometimes).
2010-12-14 17:38:42 +00:00
Petr Rockai
8891680304 Add a validation step for pvmoveN internal LVs to vg_validate. 2010-12-14 17:07:35 +00:00
Peter Rajnoha
1f80f8f371 HAVE_SELINUX again 2010-12-13 12:44:09 +00:00
Peter Rajnoha
d2fefb2e80 #ifdef HAVE_SELINUX and #ifdef HAVE_SELINUX_LABEL_H 2010-12-13 12:30:04 +00:00
Peter Rajnoha
b3032f918e Missing #elif HAVE_SELINUX 2010-12-13 12:18:38 +00:00
Milan Broz
bb37f26bbf Update configure. 2010-12-13 11:03:10 +00:00