]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoFix missing temp_buf init for error path
Zdenek Kabelac [Mon, 13 Feb 2012 14:39:24 +0000 (14:39 +0000)]
Fix missing temp_buf init for error path

In previous commit this was missing, also deallocate in reversed order.

12 years agoAdd internal error to guard vgname2 NULL dereference
Zdenek Kabelac [Mon, 13 Feb 2012 14:26:15 +0000 (14:26 +0000)]
Add internal error to guard vgname2 NULL dereference

12 years agoAdd some FIXME around allocation code
Zdenek Kabelac [Mon, 13 Feb 2012 14:25:14 +0000 (14:25 +0000)]
Add some FIXME around allocation code

Remove also unreachable break..

12 years agoNever try to test character past given buffer
Zdenek Kabelac [Mon, 13 Feb 2012 14:23:40 +0000 (14:23 +0000)]
Never try to test character past given buffer

In case units[0] would be already '\0', do not check units[1].

12 years agoMake sure dereferenced words[0] and words[1] are defined
Zdenek Kabelac [Mon, 13 Feb 2012 14:17:04 +0000 (14:17 +0000)]
Make sure dereferenced words[0] and words[1] are defined

12 years agoAdd configure --with-systemdsystemunitdir.
Peter Rajnoha [Mon, 13 Feb 2012 13:02:47 +0000 (13:02 +0000)]
Add configure --with-systemdsystemunitdir.

12 years agoHandle all succefull values from open()
Zdenek Kabelac [Mon, 13 Feb 2012 12:07:51 +0000 (12:07 +0000)]
Handle all succefull values from open()

12 years agoEnsure allocated device does not leak on error path
Zdenek Kabelac [Mon, 13 Feb 2012 12:06:39 +0000 (12:06 +0000)]
Ensure allocated device does not leak on error path

For unimplementd canonicalize_file_name set to NULL

12 years agoAdd internal error for unsupported code paths
Zdenek Kabelac [Mon, 13 Feb 2012 11:25:56 +0000 (11:25 +0000)]
Add internal error for unsupported code paths

Patch mainly helps static analyzers to better work with code paths
lvm code should never trigger.

12 years agoCheck for missing reply_uuid
Zdenek Kabelac [Mon, 13 Feb 2012 11:24:09 +0000 (11:24 +0000)]
Check for missing reply_uuid

12 years agoCheck for allocation failure
Zdenek Kabelac [Mon, 13 Feb 2012 11:18:45 +0000 (11:18 +0000)]
Check for allocation failure

12 years agoAdd check for allocation failure
Zdenek Kabelac [Mon, 13 Feb 2012 11:16:42 +0000 (11:16 +0000)]
Add check for allocation failure

12 years agoAdd few missing allocation failures tests
Zdenek Kabelac [Mon, 13 Feb 2012 11:13:44 +0000 (11:13 +0000)]
Add few missing allocation failures tests

12 years agoAdd check for rimage name allocation failure
Zdenek Kabelac [Mon, 13 Feb 2012 11:10:37 +0000 (11:10 +0000)]
Add check for rimage name allocation failure

12 years agoAdd check for mda_copy failure
Zdenek Kabelac [Mon, 13 Feb 2012 11:09:25 +0000 (11:09 +0000)]
Add check for mda_copy failure

12 years agoAdd check for failure
Zdenek Kabelac [Mon, 13 Feb 2012 11:07:55 +0000 (11:07 +0000)]
Add check for failure

12 years agoAdd free_orphan_vg
Zdenek Kabelac [Mon, 13 Feb 2012 11:03:59 +0000 (11:03 +0000)]
Add free_orphan_vg

Move commod code to destroy orphan VG into free_orphan_vg() function.
Use orphan vgmem for creation of PV lists.
Remove some free_pv_fid() calls (FIXME: check all of them)
FIXME: Check whether we could merge release_vg back again for all VGs.

12 years agoIf the same fid is already same avoid ref_counting
Zdenek Kabelac [Mon, 13 Feb 2012 11:01:34 +0000 (11:01 +0000)]
If the same fid is already same avoid ref_counting

12 years agoAdd missing test for failure of lvmcache_foreach_pv
Zdenek Kabelac [Mon, 13 Feb 2012 10:58:20 +0000 (10:58 +0000)]
Add missing test for failure of lvmcache_foreach_pv

12 years agoClean error paths for format instance
Zdenek Kabelac [Mon, 13 Feb 2012 10:56:31 +0000 (10:56 +0000)]
Clean error paths for format instance

With updated orphan VG code this code needed some updates.
Add missing log_error for allocation failures.

12 years agoRelease_vg instead of plain free in error path
Zdenek Kabelac [Mon, 13 Feb 2012 10:53:31 +0000 (10:53 +0000)]
Release_vg instead of plain free in error path

12 years agoLog error reporting for failing _alloc_pv
Zdenek Kabelac [Mon, 13 Feb 2012 10:51:52 +0000 (10:51 +0000)]
Log error reporting for failing _alloc_pv

Drop unneeded zeroing of zalloced memory region.

12 years agoDo not write to -1 buffer address
Zdenek Kabelac [Mon, 13 Feb 2012 10:49:28 +0000 (10:49 +0000)]
Do not write to -1 buffer address

In case of zero bytes would be read from sysfs, it would store '\0' on
temp_buf[-1] address.

Simplify some buffer length calculation and use strcpy if we've just
checked string fits in give buffer.

Replace jump label error: with bad: commonly used in libdm.

12 years agoRemove duplicit test
Zdenek Kabelac [Mon, 13 Feb 2012 10:45:26 +0000 (10:45 +0000)]
Remove duplicit test

When it's space it's also not a '\0'.

12 years agoUpdate autoconf.
Milan Broz [Mon, 13 Feb 2012 07:30:24 +0000 (07:30 +0000)]
Update autoconf.

12 years agoIn the new corosync world, dlm is a standalone service.
Fabio M. Di Nitto [Mon, 13 Feb 2012 05:24:57 +0000 (05:24 +0000)]
In the new corosync world, dlm is a standalone service.

Fix clvmd init script to Require dlm service when building for the
new corosync or clvmd will fail to start.

12 years agopost-release
Alasdair Kergon [Mon, 13 Feb 2012 00:23:21 +0000 (00:23 +0000)]
post-release

12 years agopre-release v2_02_91
Alasdair Kergon [Sun, 12 Feb 2012 23:02:52 +0000 (23:02 +0000)]
pre-release

12 years agoFMT_INSTANCE_VG is redundant now
Alasdair Kergon [Sun, 12 Feb 2012 23:01:19 +0000 (23:01 +0000)]
FMT_INSTANCE_VG is redundant now

12 years agoFMT_INSTANCE_PV is no longer used
Alasdair Kergon [Sun, 12 Feb 2012 22:37:24 +0000 (22:37 +0000)]
FMT_INSTANCE_PV is no longer used

12 years agouse stack consistently if 0 is considered an error
Alasdair Kergon [Sun, 12 Feb 2012 21:42:43 +0000 (21:42 +0000)]
use stack consistently if 0 is considered an error

12 years agomissing error mesg
Alasdair Kergon [Sun, 12 Feb 2012 21:37:03 +0000 (21:37 +0000)]
missing error mesg

12 years agoremove unused bits after fid changes
Alasdair Kergon [Sun, 12 Feb 2012 20:19:39 +0000 (20:19 +0000)]
remove unused bits after fid changes

12 years agogive standard error message if lstat fails unexpectedly
Alasdair Kergon [Sun, 12 Feb 2012 20:17:12 +0000 (20:17 +0000)]
give standard error message if lstat fails unexpectedly

12 years agoFix message check
Zdenek Kabelac [Fri, 10 Feb 2012 15:17:52 +0000 (15:17 +0000)]
Fix message check

Check pointer from strchr for NULL instead of crash later.
Badly formated message would have crash dmeventd otherwise.

12 years agoCheck for deps pointer before dererence
Zdenek Kabelac [Fri, 10 Feb 2012 14:48:28 +0000 (14:48 +0000)]
Check for deps pointer before dererence

As _deps() call may return NULL - check for it.

12 years agoAdd validation of name and uuid
Zdenek Kabelac [Fri, 10 Feb 2012 14:42:28 +0000 (14:42 +0000)]
Add validation of name and uuid

Do not accept NULL pointers.

12 years agoDo not crash for NULL sort_key
Zdenek Kabelac [Fri, 10 Feb 2012 14:00:07 +0000 (14:00 +0000)]
Do not crash for NULL sort_key

Guard against NULL pointer for sort_key and let it behave like an empty
string would have been passed in (i.e. no key).

12 years agoReturn error for failing allocation
Zdenek Kabelac [Fri, 10 Feb 2012 13:56:19 +0000 (13:56 +0000)]
Return error for failing allocation

Fix case, where final strdup would have failed and it would miss to return
failure for this case and return success and NULL pointer.

12 years agoAdd test for failing allocation
Zdenek Kabelac [Fri, 10 Feb 2012 13:52:05 +0000 (13:52 +0000)]
Add test for failing allocation

Avoid memcpy to NULL if realloc fails.

12 years agoAdd test for memory allocation failures
Zdenek Kabelac [Fri, 10 Feb 2012 13:49:29 +0000 (13:49 +0000)]
Add test for memory allocation failures

Replace asserts with test for failing memory allocation.
Add at least stack traces.
Index counter starts from 1 (0 reserved for error), so replacing fingerprint.

12 years agoRemove unreachable code
Zdenek Kabelac [Fri, 10 Feb 2012 13:46:23 +0000 (13:46 +0000)]
Remove unreachable code

12 years agoWhat's new.
Petr Rockai [Fri, 10 Feb 2012 02:56:54 +0000 (02:56 +0000)]
What's new.

12 years agoKeep a global (per-format) orphan_vg and keep any and all orphan PVs linked to
Petr Rockai [Fri, 10 Feb 2012 02:53:03 +0000 (02:53 +0000)]
Keep a global (per-format) orphan_vg and keep any and all orphan PVs linked to
it. Avoids the need for FMT_INSTANCE_PV and enables further simplifications. No
functional change, internal refactor only.

12 years agoWhat's new: lvmcache.
Petr Rockai [Fri, 10 Feb 2012 01:29:46 +0000 (01:29 +0000)]
What's new: lvmcache.

12 years agoMove lvmcache data structures behind an API (making the structures private to
Petr Rockai [Fri, 10 Feb 2012 01:28:27 +0000 (01:28 +0000)]
Move lvmcache data structures behind an API (making the structures private to
lvmcache.c). No functional change.

12 years agoStop processing lvextend if trying to extend a mirror that is being recovered.
Peter Rajnoha [Thu, 9 Feb 2012 15:13:42 +0000 (15:13 +0000)]
Stop processing lvextend if trying to extend a mirror that is being recovered.

Missing correct return value in lv_extend fn.

12 years agoMove label_init up in code stack
Zdenek Kabelac [Wed, 8 Feb 2012 13:44:49 +0000 (13:44 +0000)]
Move label_init up in code stack

label_exit() is called destroy_toolcontext() and we are now
using standard dm_list function for destroy, we have to make sure
dm_list gets initialized properly.

12 years agoThin add pool_below_threshold
Zdenek Kabelac [Wed, 8 Feb 2012 13:05:38 +0000 (13:05 +0000)]
Thin add pool_below_threshold

Test both data and metadata percent usage.

12 years agoA bit more readable code
Zdenek Kabelac [Wed, 8 Feb 2012 13:03:40 +0000 (13:03 +0000)]
A bit more readable code

Just a minor readability conversion.

12 years agoFix test for lv_snapshot_percent
Zdenek Kabelac [Wed, 8 Feb 2012 13:02:07 +0000 (13:02 +0000)]
Fix test for lv_snapshot_percent

Do not check for PERCENT_MERGE_FAILED if the lv_snapshot_percent() failed.
(test for snap_percent would be testing uninitialized value).

12 years agoDrop unreachable code
Zdenek Kabelac [Wed, 8 Feb 2012 12:59:45 +0000 (12:59 +0000)]
Drop unreachable code

12 years agoUse dm_asprintf to simplify code
Zdenek Kabelac [Wed, 8 Feb 2012 12:59:19 +0000 (12:59 +0000)]
Use dm_asprintf to simplify code

12 years agoSome fixmes
Zdenek Kabelac [Wed, 8 Feb 2012 12:57:15 +0000 (12:57 +0000)]
Some fixmes

'len' calculation is unused ?
Unreachable code could be removed or moved upward ?

12 years agoSwitch to return void
Zdenek Kabelac [Wed, 8 Feb 2012 12:52:58 +0000 (12:52 +0000)]
Switch to return void

List delete cannot fail, so there is no reason to test for error.

12 years agoUse dm_snprintf and improve error handling
Zdenek Kabelac [Wed, 8 Feb 2012 12:50:10 +0000 (12:50 +0000)]
Use dm_snprintf and improve error handling

Add standard error reporting with error logging.
Use plain alloc instead of zalloc for string buffer.
Use dm_snprintf with valid test for <0.

12 years agoAdd range test for device number
Zdenek Kabelac [Wed, 8 Feb 2012 12:48:14 +0000 (12:48 +0000)]
Add range test for device number

Check the output of atoi is in valid range.

12 years agoRemove duplicate test
Zdenek Kabelac [Wed, 8 Feb 2012 11:41:18 +0000 (11:41 +0000)]
Remove duplicate test

Tested condition has been already evaluated before
For strlen() code has already excluded <ID_LEN.
For repairing, already tested (!argc && !repairing) before.

12 years agoReplace snprintf with dm_snprintf
Zdenek Kabelac [Wed, 8 Feb 2012 11:40:02 +0000 (11:40 +0000)]
Replace snprintf with dm_snprintf

snprintf testing for negative is replaced with dm_snprintf where this
test really works.
Add missing test for result of dm_snprintf().

12 years agoRemove unneeded assignments
Zdenek Kabelac [Wed, 8 Feb 2012 11:36:18 +0000 (11:36 +0000)]
Remove unneeded assignments

Variables have (or will have) those values set.

12 years agoKeep page_size as signed number
Zdenek Kabelac [Wed, 8 Feb 2012 11:34:46 +0000 (11:34 +0000)]
Keep page_size as signed number

Since it's return value from sysconf and is checked for <0.

12 years agoMove done jump lower
Zdenek Kabelac [Wed, 8 Feb 2012 11:31:29 +0000 (11:31 +0000)]
Move done jump lower

Since before 'goto done' is bufused zeroed, it would otherwise write 1
byte in front of buffer.

12 years agoAdd boundary test for number of mirror devs and logs
Zdenek Kabelac [Wed, 8 Feb 2012 11:29:13 +0000 (11:29 +0000)]
Add boundary test for number of mirror devs and logs

As atoi may return negative value - test for both limits.
Test log_args for limits before calling alloca().
Code from dmeventd mirror plugin should probably share same code as
we have in mirrored.c.

12 years agoSet all parameters to 0
Zdenek Kabelac [Wed, 8 Feb 2012 11:25:09 +0000 (11:25 +0000)]
Set all parameters to 0

Since the function dm_get_next_target() returns NULL as 'next' pointer
so it's not a 'real' error - set 0 to all parameters when NULL is
returned because of missing head.

i.e. one of use case::
do {
next = dm_get_next_target(dmt, next, &start, &length,
  &target_type, &params);
size += length;
} while (next);

12 years agoCheck that whole locking_dir fits _lock_dir buffer
Zdenek Kabelac [Wed, 8 Feb 2012 11:17:34 +0000 (11:17 +0000)]
Check that whole locking_dir fits _lock_dir buffer

12 years agoMove close few lines
Zdenek Kabelac [Wed, 8 Feb 2012 11:15:38 +0000 (11:15 +0000)]
Move close few lines

Since the function dev_close() has code path, which really could close
file (for unlocked vg) and destroy dev handler, stay on safe side and move
the close few lines later, even our current use case shouldn't trigger
such scenario.

12 years agoUse dm_list_iterate_items_safe
Zdenek Kabelac [Wed, 8 Feb 2012 11:12:18 +0000 (11:12 +0000)]
Use dm_list_iterate_items_safe

And avoid direct access to list member variables.
Inline _free_li().

12 years agoFix fd resource leak in error path
Zdenek Kabelac [Wed, 8 Feb 2012 11:07:17 +0000 (11:07 +0000)]
Fix fd resource leak in error path

Use 'goto bad' to cleanup fd on error path.

12 years agoEnsure strncpy() function always ends with '\0'
Zdenek Kabelac [Wed, 8 Feb 2012 11:05:04 +0000 (11:05 +0000)]
Ensure strncpy() function always ends with '\0'

Since last character needs to be \0 for string,
pass buffer size smaller by 1 byte.

12 years agoSet status for error path
Zdenek Kabelac [Wed, 8 Feb 2012 10:56:17 +0000 (10:56 +0000)]
Set status for error path

Do not leave status unitialized, since in some cases, it's tested,
when the function returns error.

12 years agoAdd missing deps for lvm2api
Zdenek Kabelac [Wed, 8 Feb 2012 10:52:45 +0000 (10:52 +0000)]
Add missing deps for lvm2api

Hmm, wasted some time because of this missing deps....

12 years agoFix resource leaks for failing allocation
Zdenek Kabelac [Wed, 8 Feb 2012 10:49:36 +0000 (10:49 +0000)]
Fix resource leaks for failing allocation

In case, something would fail during format initialization,
return allocated memory.

12 years agoRelease allocated resources in error path
Zdenek Kabelac [Wed, 8 Feb 2012 10:46:24 +0000 (10:46 +0000)]
Release allocated resources in error path

If composite_filter_create() fails, release filters.

12 years agoCheck result of lstat
Zdenek Kabelac [Wed, 8 Feb 2012 10:43:42 +0000 (10:43 +0000)]
Check result of lstat

If lstat returns errno different from ENOENT, do not use the content of
struct stat 'buf'.

12 years agoWhat's new.
Petr Rockai [Wed, 1 Feb 2012 20:13:44 +0000 (20:13 +0000)]
What's new.

12 years agoRemove a dubious log message ("another thread is handling an event") from LVM
Petr Rockai [Wed, 1 Feb 2012 20:11:58 +0000 (20:11 +0000)]
Remove a dubious log message ("another thread is handling an event") from LVM
dmeventd plugins. Fixes RHBZ 771419.

12 years agopost-release
Alasdair Kergon [Wed, 1 Feb 2012 18:46:57 +0000 (18:46 +0000)]
post-release

12 years agopre-release
Alasdair Kergon [Wed, 1 Feb 2012 15:17:04 +0000 (15:17 +0000)]
pre-release

12 years agoAdjust comments
Alasdair Kergon [Wed, 1 Feb 2012 15:05:53 +0000 (15:05 +0000)]
Adjust comments

12 years agoAdd synchornization point in mirror log init.
Zdenek Kabelac [Wed, 1 Feb 2012 13:50:36 +0000 (13:50 +0000)]
Add synchornization point in mirror log init.

Put extra sync point when mirror log is deactivated and before
it's activated for the second time.

12 years agoDisable partial activation for thin LVs and LVs with all missing segments
Zdenek Kabelac [Wed, 1 Feb 2012 13:47:27 +0000 (13:47 +0000)]
Disable partial activation for thin LVs and LVs with all missing segments

Count number of error and existing areas and if there is no existing area
for the LV avoid its activation.

Always disable partial activatio for thin volumes.

For mirrors currently put in hack to let it pass with a special name
since current mirror code needs to activate such LV during some operations.

12 years agoAvoid warning for small pv_min_size
Zdenek Kabelac [Wed, 1 Feb 2012 13:42:18 +0000 (13:42 +0000)]
Avoid warning for small pv_min_size

Do not print warning for pv_min_size set in range between 512KB and 2MB.

12 years agoClean up systemd unit ordering and requirements.
Peter Rajnoha [Wed, 1 Feb 2012 13:08:39 +0000 (13:08 +0000)]
Clean up systemd unit ordering and requirements.

12 years agoMinor consistency update for debugging messages
Zdenek Kabelac [Wed, 1 Feb 2012 10:48:22 +0000 (10:48 +0000)]
Minor consistency update for debugging messages

Use mlock/munlock for debugging lines.

12 years agoUser correct base dir for lcov reports
Zdenek Kabelac [Wed, 1 Feb 2012 10:46:45 +0000 (10:46 +0000)]
User correct base dir for lcov reports

Fix problem when srcdir != builddir.

12 years agolost line
Alasdair Kergon [Wed, 1 Feb 2012 02:11:43 +0000 (02:11 +0000)]
lost line

12 years agoTrack unreserved space for all alloc policies and then permit NORMAL to place
Alasdair Kergon [Wed, 1 Feb 2012 02:10:45 +0000 (02:10 +0000)]
Track unreserved space for all alloc policies and then permit NORMAL to place
log and data on same single PV.

12 years agolp.pool may be (null) too
Alasdair Kergon [Wed, 1 Feb 2012 01:54:20 +0000 (01:54 +0000)]
lp.pool may be (null) too

12 years agoAutomatically detect whether corosync clvmd needs to use confdb or cmap. (fabio)
Alasdair Kergon [Tue, 31 Jan 2012 21:21:53 +0000 (21:21 +0000)]
Automatically detect whether corosync clvmd needs to use confdb or cmap. (fabio)

12 years agoFix data% reporting
Zdenek Kabelac [Sat, 28 Jan 2012 20:12:26 +0000 (20:12 +0000)]
Fix data% reporting

For reading % of mapped size of thin volume use as origin for
old style snapshot '-real' device needs to be queried.
Fix log_error report given for lvs -a in this case.

12 years agoTARGETS macro has to be defined before inclusion of make.tmpl
Zdenek Kabelac [Fri, 27 Jan 2012 10:55:02 +0000 (10:55 +0000)]
TARGETS macro has to be defined before inclusion of make.tmpl

Use @TESTING@ check in this case.

12 years agopost-release
Alasdair Kergon [Fri, 27 Jan 2012 01:23:40 +0000 (01:23 +0000)]
post-release

12 years agoBuild test run target only for $(TESTING)
Zdenek Kabelac [Thu, 26 Jan 2012 21:40:36 +0000 (21:40 +0000)]
Build test run target only for $(TESTING)

Add libraries properly in LDLIBS.

12 years agoThin for_each_sub_lv
Zdenek Kabelac [Thu, 26 Jan 2012 21:39:32 +0000 (21:39 +0000)]
Thin  for_each_sub_lv

Adapt to scan thin dependency LVs

12 years agoIf clvmd is not started, die test instead of skipping it
Zdenek Kabelac [Thu, 26 Jan 2012 18:25:46 +0000 (18:25 +0000)]
If clvmd is not started, die test instead of skipping it

12 years agoOops missed braces in previous commit
Zdenek Kabelac [Thu, 26 Jan 2012 17:55:55 +0000 (17:55 +0000)]
Oops missed braces in previous commit

This has disabled clvmd for being executed.
(FIXME improve testing part to catch this fault)

12 years agopre-release
Alasdair Kergon [Thu, 26 Jan 2012 14:02:42 +0000 (14:02 +0000)]
pre-release

12 years agopre-release
Alasdair Kergon [Thu, 26 Jan 2012 10:11:30 +0000 (10:11 +0000)]
pre-release

12 years agoCosmetic change use return macro with implicit stack
Zdenek Kabelac [Wed, 25 Jan 2012 22:38:40 +0000 (22:38 +0000)]
Cosmetic change use return macro with implicit stack

12 years agoSet missing header define
Zdenek Kabelac [Wed, 25 Jan 2012 22:37:48 +0000 (22:37 +0000)]
Set missing header define

This page took 0.062753 seconds and 5 git commands to generate.