| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Do not accept NULL pointers.
|
|
|
|
|
| |
Guard against NULL pointer for sort_key and let it behave like an empty
string would have been passed in (i.e. no key).
|
|
|
|
|
| |
Fix case, where final strdup would have failed and it would miss to return
failure for this case and return success and NULL pointer.
|
|
|
|
| |
Avoid memcpy to NULL if realloc fails.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Variables have (or will have) those values set.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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, ¶ms);
size += length;
} while (next);
|
|
|
|
| |
Use 'goto bad' to cleanup fd on error path.
|
|
|
|
|
| |
Since last character needs to be \0 for string,
pass buffer size smaller by 1 byte.
|
|
|
|
|
| |
Since _create_dm_tree_node is copying whole structure,
make sure all members are initialized.
|
|
|
|
|
| |
Introduces when added dm_device_get_name.
Close file handle in all error paths.
|
|
|
|
|
|
| |
Using PRELOAD part would lead to problems when the problem
would happen before vg_write and vg_commit.
Also this change is necessary for snapshot creation sequence.
|
| |
|
|
|
|
| |
Tweak dm_config interface and remove FIXMEs.
|
|
|
|
| |
Report both values as 0 in case the volume is unused.
|
|
|
|
|
| |
Do not shortcut to 'meta' and stay with 'metadata'
Also matches kernel doc for dm API then.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is accomplished by reading associated sysfs information. For a dm device,
this is /sys/dev/block/major:minor/dm/name (supported in kernel version >= 2.6.29,
for older kernels, the behaviour is the same as for non-dm devices).
For a non-dm device, this is a readlink on /sys/dev/block/major:minor, e.g.
/sys/dev/block/253:0 --> ../../devices/virtual/block/dm-0.
The last component of the path is a proper kernel name (block device name).
One can request to read only kernel names by setting the 'prefer_kernel_name'
argument if needed.
|
|
|
|
|
|
|
| |
LVM- prefix.
Try harder not to leave stray empty devices around (locally or remotely) when
reverting changes after failures while there are inactive tables.
|
|
|
|
|
|
|
|
| |
If we know major:minor number of device (which is known after resume) we will
try to use sysfs to set/get read ahead parameters of device.
This avoid potential problem of blocking commands like 'dmsetup info' awaiting
for device being usable for open/close - i.e. overfilled thin pool may block
such command.
|
|
|
|
|
|
|
| |
Add dm_get_status_thin_pool and dm_get_status_thin functions to
parse 'params' argument which is received via dm_get_next_target.
Returns filed structure allocated from given mempool.
|
|
|
|
| |
Support empty string values.
|
|
|
|
| |
the latter out of libdm.
|
| |
|
|
|
|
| |
(useful for just checking that a given key is of a given type).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RAID is not like traditional LVM mirroring. LVM mirroring required failed
devices to be removed or the logical volume would simply hang. RAID arrays can
keep on running with failed devices. In fact, for RAID types other than RAID1,
removing a device would mean substituting an error target or converting to a
lower level RAID (e.g. RAID6 -> RAID5, or RAID4/5 to RAID0). Therefore, rather
than removing a failed device unconditionally and potentially allocating a
replacement, RAID allows the user to "replace" a device with a new one. This
approach is a 1-step solution vs the current 2-step solution.
example> lvconvert --replace <dev_to_remove> vg/lv [possible_replacement_PVs]
'--replace' can be specified more than once.
example> lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid creation of target type name when it's longer then
DM_MAX_TYPE_NAME (noticed by static analyzer where the
sp.target_type might be missing '\0' at the end.)
Before patch:
$> dmsetup create long
0 1000 looooooooooooooooooooooooooong
^D
device-mapper: reload ioctl failed: Invalid argument
After patch:
$> dmsetup create xxx
0 1000 looooooooooooooooooooooooooong
Target type name looooooooooooooooooooooooooong is too long.
Command failed
|
|
|
|
|
|
|
| |
Remove DM_THIN_ERROR_DEVICE_ID from API.
Remove API warning.
Drop code that was using DM_THIN_ERROR_DEVICE_ID (already commented)
Remove debug message which slipped in through some previous commit.
|
| |
|
|
|
|
| |
Fixes issue reported here: http://lkml.org/lkml/2011/11/8/190
|
|
|
|
|
| |
id2 must be checked.
(missed in yesterday commit set).
|
|
|
|
|
|
| |
Avoid exposing another struct to the libdm user and
use only simple dm_tree_node_add_thin_pool_message with
2 overloaded uint64_t values.
|
|
|
|
|
|
|
| |
A little code shuffling and adding support for
DM_THIN_ERROR_DEVICE_ID which might be eventually be used
for activation of thin which is going to be deleted.
For now we do not need it lvm.
|
|
|
|
|
| |
Test for dm_snprintf < 0.
Add header for moved backup.
|
|
|
|
|
|
|
| |
Add a new node flag send_messages that is used to simplify
test when to call _node_send_messages().
Add call to _node_send_messages when pool is deeper in the tree.
|
| |
|
| |
|
|
|
|
|
|
|
| |
There should be no need for retry for our internal devices - it would be hinding
our own bug in the tree processing.
Update error messages to show also also device name.
No WHATS_NEW - in release fix.
|
|
|
|
| |
Since fixed within unreleased version so no WHATS_NEW
|
|
|
|
|
| |
Add function to allow read of empty strings as valid arguments.
Add a warning message if string argument has ignored value.
|
| |
|
|
|
|
|
| |
Since DEBUG_MEM is storing own extra structure within returned memory chunk,
glibc free must be used directly for posix_memaling() allocated block.
|
|
|
|
|
|
| |
Since we use 8 bytes by default for the pool allocation,
keep the structure aligned with this size.
(Somehow it was not applied in previous commit.)
|
|
|
|
|
|
| |
When DEBUG_MEM is used, the memory is trashed with extra pattern before real
free() is called, and as this memory was marked as non accessible when used with
valgrind, make it again usable.
|
| |
|
| |
|
| |
|