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

15972 Commits

Author SHA1 Message Date
Zdenek Kabelac
76fd99fe24 libdm: use libdm header
User libdm header file.

(cherry picked from commit 3c37764333)
2018-12-17 16:09:14 +01:00
Zdenek Kabelac
c8ca03d5b7 libdm: print params only for ioctls using them
When preparing ioctl buffer and flatting all parameters,
add table parameters only to ioctl that do process them.

Note: list of ioctl should be kept in sync with kernel code.
(cherry picked from commit 43f8da7699)
2018-12-17 14:06:22 +01:00
Zdenek Kabelac
15d51bd6d0 libdm: add DM_DEVICE_ARM_POLL
Expose DM_DEVICE_ARM_POLL via standard API enum.

(cherry picked from commit 1ae5bf2b83)
2018-12-17 14:06:16 +01:00
Zdenek Kabelac
8a568b9562 libdm: do not add params for resume and remove
DM_DEVICE_CREATE with table is doing several ioctl operations,
however only some of then takes parameters.
Since _create_and_load_v4() reused already existing dm task from
DM_DEVICE_RELOAD it has also kept passing its table parameters
to DM_DEVICE_RESUME ioctl - but this ioctl is supposed to not take
any argument and thus there is no wiping of passed data - and
since kernel returns buffer and shortens dmi->data_size accordingly,
anything past returned data size remained uncleared in zfree()
function.

This has problem if the user used dm_task_secure_data (i.e. cryptsetup),
as in this case binary expact secured data are erased from main memory
after use, but they may have been left in place.

This patch is also closing the possible hole for error path,
which also reuse same dm task structure for DM_DEVICE_REMOVE.

(cherry picked from commit 10e191fd12)
2018-12-17 14:06:08 +01:00
Marian Csontos
748f8e940a configure: update 2018-12-14 18:42:34 +01:00
Marian Csontos
3c7e395428 Revert "configure: update"
This reverts commit 855f5b5e72.
2018-12-14 18:18:10 +01:00
Marian Csontos
7ee8935929 post-release 2018-12-14 18:00:39 +01:00
Marian Csontos
1a9a6f6474 build: Upse PYTHON_CONFIG env.variable when set
This adds up to Commit 6462e8dffc.
2018-12-12 16:34:10 +01:00
Marian Csontos
5a8db25e8a udev: 69-dm-lvm-metad.rules is still needed 2018-12-12 16:34:07 +01:00
Heinz Mauelshagen
1d558bea03 man: document 's' RAID attribute bit 2018-12-12 16:26:59 +01:00
Heinz Mauelshagen
74906dad60 raid: fix (de)activation of RaidLVs with visible SubLVs
There's a small window during creation of a new RaidLV when
rmeta SubLVs are made visible to wipe them in order to prevent
erroneous discovery of stale RAID metadata.  In case a crash
prevents the SubLVs from being committed hidden after such
wiping, the RaidLV can still be activated with the SubLVs visible.
During deactivation though, a deadlock occurs because the visible
SubLVs are deactivated before the RaidLV.

The patch adds _check_raid_sublvs to the raid validation in merge.c,
an activation check to activate.c (paranoid, because the merge.c check
will prevent activation in case of visible SubLVs) and shares the
existing wiping function _clear_lvs in raid_manip.c moved to lv_manip.c
and renamed to activate_and_wipe_lvlist to remove code duplication.
Whilst on it, introduce activate_and_wipe_lv to share with
(lvconvert|lvchange).c.

Resolves: rhbz1633167
2018-12-12 16:26:55 +01:00
Heinz Mauelshagen
5d38543a00 WHATS_NEW 2018-12-12 16:26:50 +01:00
Heinz Mauelshagen
8eefba4459 lvcreate/lvconvert: prohibit creation of/conversion to mirrored mirror logs
In RHEL7 we marked mirrored mirror logs as deprecated and
added a related message.  This patch prohibits creating new
'mirror' LVs with that log type or converting existing LVs
to have one.

Existing LVs with mirrored mirror log can be activated
and converted to disk/core logs.

Avoid double deprecation message when running lvconvert.

Resolves: rhbz1643562
2018-12-12 16:26:42 +01:00
Marian Csontos
2ab6b4f438 dmeventd: Fix libdevmapper-event linking 2018-12-12 10:53:45 +01:00
David Teigland
fc091143b6 lvmlockd: fix missing LV lock for lvconvert repair
Add missing lvmlockd LV lock for lvconvert repair
on mirror and thin/cache pools.
2018-12-07 14:11:58 -06:00
David Teigland
8d107f9a20 man lvmlockd: lvextend with gfs2 2018-12-05 11:33:13 -06:00
David Teigland
cb47de4d3e remove unused full filter
it's the same as cmd->filter
2018-12-04 14:33:39 -06:00
David Teigland
7d13df8cef remove unused lvmetad filter 2018-12-04 14:33:38 -06:00
David Teigland
7478d02932 pvscan: use correct dev filters
pvscan was still using lvmetad_filter which has been
null since lvmetad was removed.  Switch it to use the
full_filter.
2018-12-04 14:33:38 -06:00
David Teigland
b63cb982ee devs: use udev info to improve md component detection
Use udev info to supplement native md component detection.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
4f8c928253 gcc: ensure sector is initilized
Some older gcc errnously report the variable can be used uninitlized.
Quite warning by explicit initalization.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
8ef634d1f9 gcc: avoid shadowing use_aio
Function use_aio() is already declared, avoid its shadowing.
lvm-globals.h:59: warning: shadowed declaration is here
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
e9eac41b31 gcc: avoid shadowing activate_lv
Function activate_lv() is already declared, avoid its shadowing.
activate.h:133: warning: shadowed declaration is here
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
98472b2579 gcc: avoid shadowing index
Some older headers were declaring 'index' so avoid its usage.
/usr/include/string.h:489: warning: shadowed declaration is here
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
76624d1a8c makefiles: ensure test dir can run unit-test 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
d910edfb37 makefiles: avoid clustering out
When ctags package is not installed, avoid cluttering output
from failing 'which' command.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
aae7f09d11 device_mapper: move internal header to front 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
2fc9a4c291 libdm: optimize dm_pool_strndup 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
484fb43584 device_mapper: optimize dm_pool_strndup 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
1e5142d3ca device_mapper: fix incorrect dm_strncpy usage
Patch 668c9d0762 introduced regression,
since the code here would actually always return failing result.
Replace it with more simple call to strndup().
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
da04f97e02 rpm: install lvm2-pvscan again
Let's repeat history once more 13d5c78a8d.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
8b13867548 tests: extend sleep 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
cc7169df30 makefiles: clean unit-test 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
99ded4c6e0 makefiles: ignore missing files 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
855f5b5e72 configure: update 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
1781344b6b tests: drop use_lvmetad from unit test 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
e5ae9b0d2f tests: reduce memory footprint 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
bb8e22d9cc tests: updates 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
9a9cf22aa0 tests: requires at least 2 iterations 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
0172a76622 tests: use select with dmsetup
Use 'dmsetup -S' to greatly simplify such loops.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
b252c20eb9 tests: add mising udev_wait
mdadm does not handle udev waiting so it may exit earlier,
while devices are still 'running'.
2018-12-04 14:33:38 -06:00
Zdenek Kabelac
4f32c4fbcd make: generate man update 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
9f705a7a64 make: generate config update 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
72aa4941af makefiles: add missing srcdir 2018-12-04 14:33:38 -06:00
Zdenek Kabelac
224bdce3eb makefiles: improving cleaning rules 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
ae9cadd535 makefiles: avoid dependency calcs for base dir
For some targets we do not want to generate dependencies.
Also add note about usage of such Makefile - it might be
possibly better to rename it to different filename to avoid
any confusion.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
325d09a60e makefiles: updates for less verbosity 2018-12-04 14:33:37 -06:00
Zdenek Kabelac
afabce13f6 makefiles: improve lcov generator
Simplify generation of lcov report.
2018-12-04 14:33:37 -06:00
Zdenek Kabelac
a75a9dcb58 base: use calloc
Make zalloc a wrapper over calloc
2018-12-04 14:33:37 -06:00
Peter Rajnoha
b6a767930f scan: md metadata version 0.90 is at the end of disk
commit de28637
  scan: use full md filter when md 1.0 devices are present

missed the fact that md superblock version 0.90 also puts
metadata at the end of the device, so the full md filter
needs to be used when either 0.90 or 1.0 is present.
2018-12-04 14:33:37 -06:00