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

449 Commits

Author SHA1 Message Date
Mike Snitzer
96171b0c03 Add inactive table query support for kernel driver >= 4.11.6 (RHEL 5.7). 2011-02-21 16:26:23 +00:00
Zdenek Kabelac
e382b2b990 Add debug message for open_count failure
Report  open_count problem as debug.

Function using _node_has_closed_parents decides whether
it's error or could be ignored.
2011-02-18 16:13:56 +00:00
Zdenek Kabelac
dad7e11288 API change - support more const arg
As dm_report_field_string() doesn't modify content of data pointer,
it can be marked as const.

It's slight API change - but doesn't require any change on the user side
and supports wider range of arguments without const casting.
(i.e. we may use as paramater const lv struct this way:  &lv->name)
2011-02-18 14:38:47 +00:00
Alasdair Kergon
252d74032a post-release 2011-02-09 12:11:21 +00:00
Alasdair Kergon
6d194f2014 pre-release 2011-02-09 12:04:39 +00:00
Alasdair Kergon
d09c912b81 post-release 2011-02-04 22:46:18 +00:00
Alasdair Kergon
60963d276e pre-release 2011-02-04 22:35:29 +00:00
Alasdair Kergon
c45e064975 pre-release 2011-02-04 22:07:43 +00:00
Milan Broz
c154d18b11 Suport DM_SECURE_DATA_FLAG.
It will be user for cryptsetup to ensure buffers are properly
wiped when sending sensitive data (key).
2011-02-04 16:08:11 +00:00
Peter Rajnoha
2fef22fa85 Set DM_UDEV_DISABLE_OTHER_RULES_FLAG for suspended DM devices in udev rules.
This is to avoid any scanning and processing of DM devices while they are in
suspended state (e.g. a rename while the device is suspended - a CHANGE event
is generated!). Otherwise, any scanning in the rules could end up with locking
the calling process until the device is resumed and so we don't receive a
notification about udev rules completion until then (and that effectively
locks out the process awaiting the notification!).

However, we still keep 'disk' and any 'subsystem' related udev rules running.
We trust these and these should check themselves whether a device is suspended
or not, not trying to run any scanning if it is.
2011-01-28 11:41:51 +00:00
Zdenek Kabelac
3289982950 Initialize pool object for each row
Fix assert abort of dmsetup (when compiled with pool debug)
dmsetup splitname --nameprefixes --noheadings --rows gvg-a2

Move pool begin in the inner loop - otherwise it would using
already 'ended' pool object.
2011-01-25 21:51:30 +00:00
Alasdair Kergon
2e776f6b50 post-release 2011-01-10 14:51:33 +00:00
Alasdair Kergon
437dac07eb pre-release 2011-01-10 14:28:17 +00:00
Zdenek Kabelac
4fef104bf1 Define DM_COOKIE_AUTO_CREATE
TODO: Use it also for already written code.
2011-01-10 13:42:31 +00:00
Peter Rajnoha
c14f565d18 Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control. 2011-01-04 14:43:53 +00:00
Alasdair Kergon
e45d947322 post-release 2010-12-21 21:08:51 +00:00
Alasdair Kergon
385933819e pre-release 2010-12-21 01:08:29 +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
Peter Rajnoha
a1cbc61c34 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.
2010-12-13 10:43:56 +00:00
Alasdair Kergon
200675b506 post-release 2010-12-06 22:13:10 +00:00
Alasdair Kergon
6424bd9e6d pre-release 2010-12-06 17:57:14 +00:00
Alasdair Kergon
7ce425114e Fix debug logging of derived flag LCK_CACHE in clvmd. 2010-12-06 17:37:09 +00:00
Alasdair Kergon
3c3e95a5a8 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.
2010-11-29 18:35:37 +00:00
Alasdair Kergon
75ab0236a9 post-release 2010-11-22 18:37:56 +00:00
Alasdair Kergon
4928dded55 pre-release 2010-11-22 14:25:22 +00:00
Alasdair Kergon
61325c32b0 Fix _output_field crash from field_id free with DEBUG_MEM. (Phillip Susi) 2010-11-19 13:17:27 +00:00
Alasdair Kergon
4894259eca post-release 2010-11-09 02:58:06 +00:00
Alasdair Kergon
ab3b542a18 pre-release 2010-11-08 19:37:40 +00:00
Peter Rajnoha
032a206a83 Allocate buffer for reporting functions dynamically to support long outputs.
Fix memory leak of field_id in _output_field function.

There's been a patch added recently to use dynamic allocation for metadata
tags buffer to remove the 4k limit (for writing metadata out). However, when
using reporting commands like vgs and lvs, we still need to fix libdm reporting
functions themselves to support such long outputs. So the buffer used in those
reporting functions is dynamic now.

The patch also includes a fix for field_id memory leak which was found in
the _output_field function.
2010-11-01 13:31:55 +00:00
Alasdair Kergon
d5f5a46b33 post-release 2010-10-25 16:38:20 +00:00
Alasdair Kergon
73ac1ba150 pre-release 2010-10-25 13:54:29 +00:00
Zdenek Kabelac
fba05d7ba1 Use const pointer for return value of dm_basename
Fix return pointer to const as it is created from passed input const pointer.
2010-10-25 13:13:53 +00:00
Alasdair Kergon
5426e85284 Add --setuuid to dmsetup rename.
Add dm_task_set_newuuid to set uuid of mapped device post-creation. (pjones)
2010-10-15 01:10:27 +00:00
Alasdair Kergon
3df29c1667 Speed up CRC32 calculations by using a larger lookup table.
Use -DDEBUG_CRC32 to revert to old function and check new one gives same result.
2010-09-27 19:09:34 +00:00
Alasdair Kergon
abf6c8eb4d pre-release 2010-09-24 16:24:57 +00:00
Alasdair Kergon
6f4fb574ec Track recursive filter iteration to avoid refreshing while in use. (2.02.56) 2010-09-22 01:36:13 +00:00
Alasdair Kergon
90c883c201 post-release 2010-08-19 22:33:14 +00:00
Alasdair Kergon
2d0b95cd49 pre-release 2010-08-18 20:57:10 +00:00
Peter Rajnoha
e2bc7a277e Fix dm-mod autoloading logic to not assume control node is set correctly.
We can't rely on the fact that udev should prepare the node with right major
and minor number to trigger the module autoloading. We have to take into
account that the node could be missing or it could exist with improper
major and minor number assigned (e.g. from previous kernel versions in
an environment with static nodes and without udev). Make any corrections
if needed!
2010-08-18 13:11:56 +00:00
Alasdair Kergon
063436c82b Various small cleanups and fixes related to monitoring. 2010-08-16 22:54:35 +00:00
Alasdair Kergon
59585550a7 Remove superfluous NULL pointer tests before dm_free from dmeventd. 2010-08-16 18:19:46 +00:00
Peter Rajnoha
7ab3c4c091 WHATS_NEW_DM 2010-08-16 11:22:08 +00:00
Peter Rajnoha
f3645e3f4b Fix udev rules to support udev database content generated by older rules.
This can happen with older rules (without support for synthesized events)
that are still part of initrd while using new udev rules in the system itself.

The consequence was that new udev rules incorrectly assumed that not having
DM_UDEV_PRIMARY_SOURCE_FLAG set always means the uevent is synthesized and
inappropriate (device is still not properly activated) and so it should be
ignored. However, initrd is not updated automatically while updating the
libdevmapper/udev rules in the system and so we end up with the rules not
detecting and setting crucial parts in the initrd environment and the rules
in the system that rely on the information that should have been stored in
udev db (which is incorrect in this configuration, of course).

The overall consequence is that the update of libdevmapper/lvm2 without
regenerating the initrd could end up with a boot failure! Ignoring the event
means removing any existing symlinks in /dev!

To fix this, increase udev rules version to make a difference. So from now on,
mark rules without proper support for synthesized events as
DM_UDEV_RULES_VSN="1" and 2 (or higher) if that support is included.
2010-08-12 13:41:18 +00:00
Peter Rajnoha
d818035d3a Reinstate detection of inappropriate uevent with DISK_RO set and suppress it.
We still need to detect this one! We're not so strict with CHANGE events as
with the ADD events while applying filters in the rules so this one would
pass and it would process the rules prematurely (because it appears *before*
the actual CHANGE event used when resuming a DM device while setting read-only
state at the same time).
2010-08-12 13:07:08 +00:00
Peter Rajnoha
de5337b187 WHATS_NEW_DM 2010-08-11 13:12:31 +00:00
Peter Rajnoha
67ef389a69 Use built-in rules for device aliases: block/ < dm- < disk/ < mapper/ < other. 2010-08-03 13:39:27 +00:00
Zdenek Kabelac
a7ca42cb22 Wait for node creation before displaying debug info in dmsetup.
Readahead check needs to see created node - so wait till udev gets in sync.
2010-08-03 13:04:32 +00:00
Zdenek Kabelac
a8dc5260b7 Fix return status 0 for "dmsetup info -c -o help".
Solution returns success for _report_init when help is passed,
and caller needs to check for _report existance.
2010-08-03 12:56:00 +00:00
Peter Rajnoha
d33d0b01bf Add check for kernel semaphore support and disable udev_sync if not available.
udev_sync feature requires semaphores (part of System V IPC) to be configured
in kernel (CONFIG_SYSVIPC). Check whether it is supported and if not, give
a warning message and disable udev synchronisation code automatically to
avoid any further error states and associated problems.

One should use the kernel with System V IPC support enabled or libdevmapper
with udev_sync feature disabled.
2010-08-03 07:56:03 +00:00
Alasdair Kergon
9934a167a2 post-release 2010-07-28 21:58:08 +00:00