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

16000 Commits

Author SHA1 Message Date
Zdenek Kabelac
034ea414f6 makefile: fixes build for older system
With older gcc - we need to resolve symbols linked with devmapper-event
that is now using -ldevmapper.

Also add forgotten systemd library needed for dbus notification.

(cherry picked from commit 5db56b36f1)
2018-12-17 16:14:53 +01:00
Zdenek Kabelac
7d14327dd2 makefiles: correcting login of makefile
Fixing some ordering issue with inclusion of common make.tmpl.
Correcting dependency calculation
Simplifying inclusive makefile

(cherry picked from commit 94237354dd)
2018-12-17 16:14:52 +01:00
Zdenek Kabelac
8c5f520480 makefiles: dm-tools improve Makefile
(cherry picked from commit 0dc7abe013)
2018-12-17 16:14:51 +01:00
Zdenek Kabelac
fc858b8f02 makefiles: allow to set LIBS in Makefiles
Avoid doing hard set of LIBS var,
so if the LIBS is set before 'include make.tmpl' it's not lost.
This gives better control over order of linked libraries.

(cherry picked from commit b5366b1d8d)
2018-12-17 16:14:50 +01:00
Zdenek Kabelac
366f206f66 makefiles: no longer used define
Not used anymore -D_BUILDING_LVM

(cherry picked from commit 143c8dcd7f)
2018-12-17 16:14:49 +01:00
Zdenek Kabelac
54f95afb25 makefiles: missing cleaning
(cherry picked from commit a665206453)
2018-12-17 16:14:48 +01:00
Zdenek Kabelac
823c135711 makefiles: quite install
(cherry picked from commit f619cac598)
2018-12-17 16:14:47 +01:00
Zdenek Kabelac
a9c810629c makefiles: drop unneeded LIBS add
(cherry picked from commit a63015442e)
2018-12-17 16:14:47 +01:00
Zdenek Kabelac
d327a2e280 makefiles: sort
(cherry picked from commit d76b4afb8e)
2018-12-17 16:14:46 +01:00
Zdenek Kabelac
a81e9e2912 cmirror: link with libdm
Since there is very little change there will be any new devel going
to happing with cmirror - avoid eating extra disk space and link
with already installed libdm which implements all use basic
function of dm list

(cherry picked from commit a8cdd9e16a)
2018-12-17 16:14:45 +01:00
Zdenek Kabelac
1a0bf79b72 lvm: drop usage of dl library
Since lvm no longer supports any dlopen-able plugins
(which in practice was never really usable) drop linking
with -ldl.

(cherry picked from commit 701ecff0ff)

Conflicts:
	lib/commands/toolcontext.c
2018-12-17 16:14:35 +01:00
Zdenek Kabelac
81fdc82526 dmeventd: do not link internal libraries to plugins
Avoid linking internal device-mapper and link dynamically libdevmapper.
This considerably reduced size of installed binaries.

(cherry picked from commit 8bf445b2de)
2018-12-17 16:11:21 +01:00
Zdenek Kabelac
530b2df463 dmeventd: fix linking with libdevmapper
Since dmeventd is 'libdm' based project, it needs to link
libdm library instead of its internal version

An external users may provide plugins loadeable by dmeventd.
So external user of libdevmapper-event library has no other option
then to link with released libdevmapper library.

The complexity comes with lvm2 plugins.
The lvm2 plugin itself uses internal version of device_mapper,
but libdevmapper-event usage is libdm based - so there needs to be avoided
any breakage on compatibility of internal i.e. dm_task_run structures.

TODO: most likely dmeventd itself should be moved into libdm/dm-tools dir,
and only lvm2 plugins should be created as part of lvm project,
but those still need to link with libdevmapper.

(cherry picked from commit 035a7b9a4b)
2018-12-17 16:11:20 +01:00
Zdenek Kabelac
48a7502c57 dmfilemapd: avoid linking with DL_LIBS
Dmfilemapd is not using dlopen so doesn't need to be linked with
DL_LIBS.

(cherry picked from commit c666e8d25e)
2018-12-17 16:11:20 +01:00
Zdenek Kabelac
01943774cd lvconvert: ensure proper init of pv_list
(cherry picked from commit f514e37978)
2018-12-17 16:11:18 +01:00
Tony Asleson
ef907d5321 lvmdbusd: Update table lookup for state lv_attr
(cherry picked from commit 2e01af0f78)
2018-12-17 16:11:17 +01:00
Tony Asleson
48f00baea2 lvmdbusd: Update table lookup for health lv_attr
(cherry picked from commit a6cba2d0a0)
2018-12-17 16:11:16 +01:00
Tony Asleson
da9b499bc2 lvmdbusd: Handle missing lv_attr table lookups
If we don't know the meaning we will return the key with default text
instead of raising an exception and taking the daemon out in the
process.

Resolves: rhbz1657950
(cherry picked from commit 51f08efaa7)
2018-12-17 16:11:15 +01:00
Tony Asleson
cc59cb1abc lvmdbusd: Dump blackbox newest first
When we get bug reports we may not get the entire log, so lets
dump the fight recorder from newest to oldest as the one we
are interested in was likely to be the last command run.

(cherry picked from commit f1684bf8e8)
2018-12-17 16:11:14 +01:00
Ming-Hung Tsai
219ba4f54a lvmanip: uninitialized members in struct pv_list (#10)
Scenario: Given an existed LV `lvol0`, I want to create another LV
on the PVs used by `lvol0`.

I use `build_parallel_areas_from_lv()` to obtain the `pv_list` of each segments.
However, the returned `pv_list` is not properly initialized, which causes
segfault in subsequent operations.

(cherry picked from commit 859feb81e5)
2018-12-17 16:11:10 +01:00
Zdenek Kabelac
d202d54a6c debug: drop extra tracing
Stack tracing after log_error() is not needed.

(cherry picked from commit db6d9e04af)
2018-12-17 16:11:09 +01:00
Zdenek Kabelac
d7725f9b37 cleanup: some local headers first
(cherry picked from commit cc5cfb88d7)
2018-12-17 16:11:09 +01:00
Zdenek Kabelac
4d172f69cc makefiles: some leftovers from lvmetad
(cherry picked from commit 73bef5e3dd)
2018-12-17 16:11:08 +01:00
Zdenek Kabelac
81f25b2c32 makefiles: local headers first
(cherry picked from commit 4801919b01)
2018-12-17 16:11:07 +01:00
Zdenek Kabelac
08dc705c4e makefiles: drop unneeded include path
(cherry picked from commit 454024f957)
2018-12-17 16:11:06 +01:00
Zdenek Kabelac
1f4179d1ed makefiles: correct libdm dependency
Correcting dependency tracking for libdm internal files.

(cherry picked from commit 0f5bdd4d31)
2018-12-17 16:11:05 +01:00
Zdenek Kabelac
cdf315e158 headers: use full path header instead of -I directive
Replace Makefile -I  with full path to headers like we use now
everywhere else.

(cherry picked from commit 63b0f0dab8)
2018-12-17 16:11:04 +01:00
Zdenek Kabelac
8fad471c6e headers: use configure.h as 1st. header
Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.

Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.

(cherry picked from commit 0b19387dae)

Conflicts:
	include/configure.h.in
2018-12-17 16:10:56 +01:00
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