1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

6582 Commits

Author SHA1 Message Date
Zdenek Kabelac
424f6dc4ad Handle all succefull values from open() 2012-02-13 12:07:51 +00:00
Zdenek Kabelac
e66b3e8e3b Ensure allocated device does not leak on error path
For unimplementd canonicalize_file_name set to NULL
2012-02-13 12:06:39 +00:00
Zdenek Kabelac
73e62cdc11 Add internal error for unsupported code paths
Patch mainly helps static analyzers to better work with code paths
lvm code should never trigger.
2012-02-13 11:25:56 +00:00
Zdenek Kabelac
74b5744b4b Check for missing reply_uuid 2012-02-13 11:24:09 +00:00
Zdenek Kabelac
65d01ed981 Check for allocation failure 2012-02-13 11:18:45 +00:00
Zdenek Kabelac
3e74542b5d Add check for allocation failure 2012-02-13 11:16:42 +00:00
Zdenek Kabelac
daaea2ef94 Add few missing allocation failures tests 2012-02-13 11:13:44 +00:00
Zdenek Kabelac
cbe6bcd593 Add check for rimage name allocation failure 2012-02-13 11:10:37 +00:00
Zdenek Kabelac
bed744c15d Add check for mda_copy failure 2012-02-13 11:09:25 +00:00
Zdenek Kabelac
fde44d055b Add check for failure 2012-02-13 11:07:55 +00:00
Zdenek Kabelac
52f2f3eae4 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.
2012-02-13 11:03:59 +00:00
Zdenek Kabelac
65079de265 If the same fid is already same avoid ref_counting 2012-02-13 11:01:34 +00:00
Zdenek Kabelac
960ee343f3 Add missing test for failure of lvmcache_foreach_pv 2012-02-13 10:58:20 +00:00
Zdenek Kabelac
f9411bb2af Clean error paths for format instance
With updated orphan VG code this code needed some updates.
Add missing log_error for allocation failures.
2012-02-13 10:56:31 +00:00
Zdenek Kabelac
874a4fd80d Release_vg instead of plain free in error path 2012-02-13 10:53:31 +00:00
Zdenek Kabelac
bbf98c19a8 Log error reporting for failing _alloc_pv
Drop unneeded zeroing of zalloced memory region.
2012-02-13 10:51:52 +00:00
Zdenek Kabelac
820aa36192 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.
2012-02-13 10:49:28 +00:00
Zdenek Kabelac
69ad7c1aff Remove duplicit test
When it's space it's also not a '\0'.
2012-02-13 10:45:26 +00:00
Milan Broz
75fad6eaa7 Update autoconf. 2012-02-13 07:30:24 +00:00
Fabio M. Di Nitto
94424fabd0 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.
2012-02-13 05:24:57 +00:00
Alasdair Kergon
0a182731e4 post-release 2012-02-13 00:23:21 +00:00
Alasdair Kergon
79b3966a34 pre-release 2012-02-12 23:02:52 +00:00
Alasdair Kergon
b719e3d323 FMT_INSTANCE_VG is redundant now 2012-02-12 23:01:19 +00:00
Alasdair Kergon
ba14fff2af FMT_INSTANCE_PV is no longer used 2012-02-12 22:37:24 +00:00
Alasdair Kergon
f3f6c17250 use stack consistently if 0 is considered an error 2012-02-12 21:42:43 +00:00
Alasdair Kergon
2a434c479d missing error mesg 2012-02-12 21:37:03 +00:00
Alasdair Kergon
10670c641b remove unused bits after fid changes 2012-02-12 20:19:39 +00:00
Alasdair Kergon
72b50d7fd2 give standard error message if lstat fails unexpectedly 2012-02-12 20:17:12 +00:00
Zdenek Kabelac
8380b37529 Fix message check
Check pointer from strchr for NULL instead of crash later.
Badly formated message would have crash dmeventd otherwise.
2012-02-10 15:17:52 +00:00
Zdenek Kabelac
4d95ccc696 Check for deps pointer before dererence
As _deps() call may return NULL - check for it.
2012-02-10 14:48:28 +00:00
Zdenek Kabelac
3b5834d78b Add validation of name and uuid
Do not accept NULL pointers.
2012-02-10 14:42:28 +00:00
Zdenek Kabelac
2c711a2502 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).
2012-02-10 14:00:07 +00:00
Zdenek Kabelac
36ddbdbbe2 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.
2012-02-10 13:56:19 +00:00
Zdenek Kabelac
c046a59e7f Add test for failing allocation
Avoid memcpy to NULL if realloc fails.
2012-02-10 13:52:05 +00:00
Zdenek Kabelac
511a5f3ad8 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.
2012-02-10 13:49:29 +00:00
Zdenek Kabelac
5726f4aaac Remove unreachable code 2012-02-10 13:46:23 +00:00
Petr Rockai
872b97a752 What's new. 2012-02-10 02:56:54 +00:00
Petr Rockai
6e41729eb8 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.
2012-02-10 02:53:03 +00:00
Petr Rockai
0fbbc6ce13 What's new: lvmcache. 2012-02-10 01:29:46 +00:00
Petr Rockai
8e5f7cf3dc Move lvmcache data structures behind an API (making the structures private to
lvmcache.c). No functional change.
2012-02-10 01:28:27 +00:00
Peter Rajnoha
5fa417a9c0 Stop processing lvextend if trying to extend a mirror that is being recovered.
Missing correct return value in lv_extend fn.
2012-02-09 15:13:42 +00:00
Zdenek Kabelac
b93c1332d1 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.
2012-02-08 13:44:49 +00:00
Zdenek Kabelac
a7e2da0585 Thin add pool_below_threshold
Test both data and metadata percent usage.
2012-02-08 13:05:38 +00:00
Zdenek Kabelac
cdcf7aaf07 A bit more readable code
Just a minor readability conversion.
2012-02-08 13:03:40 +00:00
Zdenek Kabelac
94f88a4f14 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).
2012-02-08 13:02:07 +00:00
Zdenek Kabelac
a13efe5665 Drop unreachable code 2012-02-08 12:59:45 +00:00
Zdenek Kabelac
d707e133d3 Use dm_asprintf to simplify code 2012-02-08 12:59:19 +00:00
Zdenek Kabelac
9278655de1 Some fixmes
'len' calculation is unused ?
Unreachable code could be removed or moved upward ?
2012-02-08 12:57:15 +00:00
Zdenek Kabelac
462835faa0 Switch to return void
List delete cannot fail, so there is no reason to test for error.
2012-02-08 12:52:58 +00:00
Zdenek Kabelac
33dea28e23 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.
2012-02-08 12:50:10 +00:00