Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9830aa207c192d6d25d6a…
Commit: 9830aa207c192d6d25d6a7ab2d7186eb91b043b9
Parent: 3750b0cff5ab1c41076afdf8275e3fa20aa756d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 21 12:58:03 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 21 21:42:30 2018 +0100
cleanup: missing copyright header
---
scripts/generator-internals.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/scripts/generator-internals.c b/scripts/generator-internals.c
index 9919247..0929b78 100644
--- a/scripts/generator-internals.c
+++ b/scripts/generator-internals.c
@@ -1,3 +1,17 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of the device-mapper userspace tools.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU General Public License v.2.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
// This file contains the unit testable parts of
// lvm2_activation_generator_systemd_red_hat
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a7034fa4200d63207daa4…
Commit: a7034fa4200d63207daa45290150159dd02cf01f
Parent: 5bdcafff47ee6a2e57e0c57d18cbc36cf1a2973e
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Dec 18 12:43:57 2018 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Dec 20 10:27:30 2018 -0600
tests/dbus: Re-enable nesting and pvcreate via symlink
If we are running the test where the device is /dev/* we will will
run the unit tests 'test_nesting' and 'test_pv_symlinks'. Otherwise
we will skip them.
---
test/dbus/lvmdbustest.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index d633aa3..9bc1683 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1873,14 +1873,13 @@ class TestDbusService(unittest.TestCase):
# when run from lvm2 testsuite. See dbustest.sh.
pv_object_path = self.objs[PV_INT][0].object_path
- if not pv_object_path.startswith("/dev"):
- std_err_print('Skipping test not running in /dev')
- return
+ if not self.objs[PV_INT][0].Pv.Name.startswith("/dev"):
+ raise unittest.SkipTest('test not running in /dev')
for i in range(0, 5):
pv_object_path = self._create_nested(pv_object_path)
- def DISABLED_test_pv_symlinks(self):
+ def test_pv_symlinks(self):
# Lets take one of our test PVs, pvremove it, find a symlink to it
# and re-create using the symlink to ensure we return an object
# path to it. Additionally, we will take the symlink and do a lookup
@@ -1891,6 +1890,9 @@ class TestDbusService(unittest.TestCase):
pv = self.objs[PV_INT][0]
pv_device_path = pv.Pv.Name
+ if not pv_device_path.startswith("/dev"):
+ raise unittest.SkipTest('test not running in /dev')
+
self._pv_remove(pv)
# Make sure we no longer find the pv
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ab1f1a306bf8e146c1221…
Commit: ab1f1a306bf8e146c1221786a1c1c24f8b71a377
Parent: 3320ab8334794684b4d324bb78d0b293a27287a6
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Dec 18 09:49:36 2018 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Dec 20 10:27:30 2018 -0600
lvmdbusd: Exit daemon when unable to retrieve state
In some cases we get stuck where we are unable to retrieve the current
state of lvm as we are encountering an error. When the error is
persistent we will log and exit the daemon instead of consuming vast
amounts of resources.
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
daemons/lvmdbusd/cfg.py | 10 ++++++++++
daemons/lvmdbusd/fetch.py | 19 ++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmdbusd/cfg.py b/daemons/lvmdbusd/cfg.py
index 771909f..be497d0 100644
--- a/daemons/lvmdbusd/cfg.py
+++ b/daemons/lvmdbusd/cfg.py
@@ -87,3 +87,13 @@ blackbox = None
# RequestEntry ctor
create_request_entry = None
+
+
+def exit_daemon():
+ """
+ Exit the daemon cleanly
+ :return:
+ """
+ if run and loop:
+ run.value = 0
+ loop.quit()
diff --git a/daemons/lvmdbusd/fetch.py b/daemons/lvmdbusd/fetch.py
index 69a4aae..e8f3521 100644
--- a/daemons/lvmdbusd/fetch.py
+++ b/daemons/lvmdbusd/fetch.py
@@ -14,6 +14,7 @@ from . import cfg
from .utils import MThreadRunner, log_debug, log_error
import threading
import queue
+import time
import traceback
@@ -82,6 +83,8 @@ class StateUpdate(object):
@staticmethod
def update_thread(obj):
+ exception_count = 0
+
queued_requests = []
while cfg.run.value != 0:
# noinspection PyBroadException
@@ -136,12 +139,26 @@ class StateUpdate(object):
# wake up if we get an exception
queued_requests = []
+ # We retrieved OK, clear exception count
+ exception_count = 0
+
except queue.Empty:
pass
- except Exception:
+ except Exception as e:
st = traceback.format_exc()
log_error("update_thread exception: \n%s" % st)
cfg.blackbox.dump()
+ exception_count += 1
+ if exception_count >= 5:
+ for i in queued_requests:
+ i.set_result(e)
+
+ log_error("Too many errors in update_thread, exiting daemon")
+ cfg.exit_daemon()
+
+ else:
+ # Slow things down when encountering errors
+ time.sleep(1)
def __init__(self):
self.lock = threading.RLock()
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5bdcafff47ee6a2e57e0c…
Commit: 5bdcafff47ee6a2e57e0c57d18cbc36cf1a2973e
Parent: ab1f1a306bf8e146c1221786a1c1c24f8b71a377
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Dec 18 09:51:50 2018 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Dec 20 10:27:30 2018 -0600
lvmdbusd: Handle exported VG(s)
When a VG is exported, the 'fullreport' returns an exit code of 5, but
otherwise returns the data we are wanting.
Signed-off-by: Tony Asleson <tasleson(a)redhat.com>
---
daemons/lvmdbusd/cmdhandler.py | 3 ++-
daemons/lvmdbusd/lvm_shell_proxy.py.in | 5 ++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index a9177c5..fde7f5e 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -497,7 +497,8 @@ def lvm_full_report_json():
])
rc, out, err = call(cmd)
- if rc == 0:
+ # When we have an exported vg the exit code of lvs or fullreport will be 5
+ if rc == 0 or rc == 5:
# With the current implementation, if we are using the shell then we
# are using JSON and JSON is returned back to us as it was parsed to
# figure out if we completed OK or not
diff --git a/daemons/lvmdbusd/lvm_shell_proxy.py.in b/daemons/lvmdbusd/lvm_shell_proxy.py.in
index 203de6f..b76b336 100644
--- a/daemons/lvmdbusd/lvm_shell_proxy.py.in
+++ b/daemons/lvmdbusd/lvm_shell_proxy.py.in
@@ -220,7 +220,10 @@ class LVMShellProxy(object):
# Parse the report to see what happened
if 'log' in report_json:
- if report_json['log'][-1:][0]['log_ret_code'] == '1':
+ ret_code = int(report_json['log'][-1:][0]['log_ret_code'])
+ # If we have an exported vg we get a log_ret_code == 5 when
+ # we do a 'fullreport'
+ if (ret_code == 1) or (ret_code == 5 and argv[0] == 'fullreport'):
rc = 0
else:
error_msg = self.get_error_msg()
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9785e40b8d52fd87d7c45…
Commit: 9785e40b8d52fd87d7c451ed838f450aee41ba8d
Parent: f05104af76e26f0757df1500540e767dd889ae71
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Dec 19 12:54:14 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Dec 20 13:26:55 2018 +0100
dmeventd: resolve compilation of vdo status parsing
A bit of chicken & egg problem - dmeventd needs to use old libdm library.
VDO is only part of new device_mapper internal library.
So include directly source file for parsing status - this fixes usability
problem of VDO plugin introduced with previous Makefile reshaping
patchset.
NOTE: source file needs to be keep then compilable in both environments.
Also add missing copyright header.
---
daemons/dmeventd/plugins/vdo/dmeventd_vdo.c | 4 +++-
device_mapper/vdo/status.c | 22 ++++++++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
index b5e2766..d5156cd 100644
--- a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
+++ b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c
@@ -15,7 +15,9 @@
#include "lib/misc/lib.h"
#include "daemons/dmeventd/plugins/lvm2/dmeventd_lvm.h"
#include "daemons/dmeventd/libdevmapper-event.h"
-#include "device_mapper/vdo/target.h"
+
+/* Use parser from new device_mapper library */
+#include "device_mapper/vdo/status.c"
#include <sys/wait.h>
#include <stdarg.h>
diff --git a/device_mapper/vdo/status.c b/device_mapper/vdo/status.c
index 40e69ba..a34029d 100644
--- a/device_mapper/vdo/status.c
+++ b/device_mapper/vdo/status.c
@@ -1,8 +1,26 @@
+/*
+ * Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of the device-mapper userspace tools.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Note: this object is also used by VDO dmeventd plugin for parsing status */
+/* File could be included by VDO plugin and can use original libdm library */
+#ifndef LIB_DMEVENT_H
#include "configure.h"
-#include "target.h"
-
// For DM_ARRAY_SIZE!
#include "device_mapper/all.h"
+#endif
+
+#include "device_mapper/vdo/target.h"
#include "base/memory/zalloc.h"
#include <ctype.h>
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e82303fd6abc3ae43168f…
Commit: e82303fd6abc3ae43168f8032806c7c17d181a3e
Parent: 1f1d36f6a2b441fbf84e59f435bd5169459392b1
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Dec 17 19:24:37 2018 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Dec 17 19:28:54 2018 +0100
lvcreate/lvconvert: optionally reenable mirrored mirror log for testing purposes only
This is a followup patch to commit edb72cb70cb8abd0acb92f07937715be2816d04a
to support related lvm2 test suite tests.
A 'global/support_mirrored_mirror_log' bool configuration variable gets
introduced allowing the creation of, or conversion to mirrored 'mirror'
logs if set. The capability to create these in turn allows the rest of
the tests to perform activation of such existing LVs and their conversions
to disk/core 'mirror' logs.
Display a disclaimer warning if enabled that this is not for regular use.
Add definition of the enabled config option to respective test scripts.
Related: rhbz1643562
---
conf/example.conf.in | 11 +++++++++++
lib/config/config_settings.h | 11 +++++++++++
lib/metadata/mirror.c | 10 +++++++---
test/shell/lvconvert-mirror.sh | 2 ++
test/shell/lvconvert-repair-replace.sh | 4 +++-
test/shell/lvconvert-repair.sh | 4 +++-
test/shell/lvconvert-twostep.sh | 4 +++-
test/shell/lvcreate-operation.sh | 4 +++-
test/shell/snapshots-of-mirrors.sh | 4 +++-
test/shell/vgsplit-operation.sh | 4 +++-
10 files changed, 49 insertions(+), 9 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 0204f4b..85465f5 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -904,6 +904,17 @@ global {
#
mirror_segtype_default = "@DEFAULT_MIRROR_SEGTYPE@"
+ # Configuration option global/support_mirrored_mirror_log.
+ # Enable mirrored 'mirror' log type for testing.
+ #
+ # This type is deprecated to create or convert to but can
+ # be enabled to test that activation of existing mirrored
+ # logs and conversion to disk/core works.
+ #
+ # Not supported for regular operation!
+ #
+ support_mirrored_mirror_log = 0
+
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index e473dd5..b0fcf8a 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -960,6 +960,17 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
" fashion in a cluster.\n"
"#\n")
+cfg(global_support_mirrored_mirror_log_CFG, "support_mirrored_mirror_log", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 3, 2), NULL, 0, NULL,
+ "Configuration option global/support_mirrored_mirror_log.\n"
+ "Enable mirrored 'mirror' log type for testing.\n"
+ "#\n"
+ "This type is deprecated to create or convert to but can\n"
+ "be enabled to test that activation of existing mirrored\n"
+ "logs and conversion to disk/core works.\n"
+ "#\n"
+ "Not supported for regular operation!\n"
+ "\n")
+
cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID10_SEGTYPE, vsn(2, 2, 99), "@DEFAULT_RAID10_SEGTYPE@", 0, NULL,
"The segment type used by the -i -m combination.\n"
"The --type raid10|mirror option overrides this setting.\n"
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index 8b20979..6950546 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2008,2018 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -1908,8 +1908,12 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
}
if (log_count > 1) {
- log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
- return 0;
+ if (find_config_tree_bool(cmd, global_support_mirrored_mirror_log_CFG, NULL))
+ log_warn("Log type \"mirrored\" creation/conversion is not supported for regular operation!");
+ else {
+ log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
+ return 0;
+ }
}
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh
index 8f37645..7cf498d 100644
--- a/test/shell/lvconvert-mirror.sh
+++ b/test/shell/lvconvert-mirror.sh
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_pvs 5
get_devs
diff --git a/test/shell/lvconvert-repair-replace.sh b/test/shell/lvconvert-repair-replace.sh
index 1fe7965..3cd1fac 100644
--- a/test/shell/lvconvert-repair-replace.sh
+++ b/test/shell/lvconvert-repair-replace.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 6
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 5f7b851..ae8fa7e 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2008-2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2008-2013,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -12,6 +12,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
recreate_vg_()
{
vgremove -ff $vg
diff --git a/test/shell/lvconvert-twostep.sh b/test/shell/lvconvert-twostep.sh
index 44527f0..afc9d47 100644
--- a/test/shell/lvconvert-twostep.sh
+++ b/test/shell/lvconvert-twostep.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 4
lvcreate -aey --type mirror -m 1 --mirrorlog disk --ignoremonitoring -L 1 -n mirror $vg
diff --git a/test/shell/lvcreate-operation.sh b/test/shell/lvcreate-operation.sh
index 5faa39f..568af36 100644
--- a/test/shell/lvcreate-operation.sh
+++ b/test/shell/lvcreate-operation.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2008 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2008,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
cleanup_lvs() {
lvremove -ff $vg
(dm_table | not grep $vg) || \
diff --git a/test/shell/snapshots-of-mirrors.sh b/test/shell/snapshots-of-mirrors.sh
index 48cadc5..f2f2943 100644
--- a/test/shell/snapshots-of-mirrors.sh
+++ b/test/shell/snapshots-of-mirrors.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2010,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -14,6 +14,8 @@
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
aux prepare_vg 4
lvcreate -aey --type mirror -m 1 -L 10M --nosync -n lv $vg
diff --git a/test/shell/vgsplit-operation.sh b/test/shell/vgsplit-operation.sh
index ab88866..eb24a58 100644
--- a/test/shell/vgsplit-operation.sh
+++ b/test/shell/vgsplit-operation.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2007,2018 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
@@ -17,6 +17,8 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+aux lvmconf "global/support_mirrored_mirror_log=1"
+
COMM() {
LAST_TEST="$*"
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=035a7b9a4bf77798d9d7e…
Commit: 035a7b9a4bf77798d9d7ecdb7cfa8dfd77a92729
Parent: c666e8d25e724802a85489c548adc763949fdfa9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Dec 14 16:28:26 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 14 22:33:22 2018 +0100
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.
---
daemons/dmeventd/Makefile.in | 3 +--
daemons/dmeventd/dmeventd.c | 13 ++++++-------
daemons/dmeventd/libdevmapper-event.c | 9 +++++----
daemons/dmeventd/libdevmapper-event.h | 1 +
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in
index 0a03d66..6bd36d0 100644
--- a/daemons/dmeventd/Makefile.in
+++ b/daemons/dmeventd/Makefile.in
@@ -57,8 +57,7 @@ all: device-mapper
device-mapper: $(TARGETS)
CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS)
-LIBS += $(PTHREAD_LIBS)
-LIBS += $(INTERNAL_LIBS)
+LIBS += $(PTHREAD_LIBS) -L$(top_builddir)/libdm -ldevmapper
dmeventd: $(LIB_SHARED) dmeventd.o
@echo " [CC] $@"
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index dcc743d..4a58449 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -16,14 +16,13 @@
* dmeventd - dm event daemon to monitor active mapped devices
*/
-#include "device_mapper/misc/dmlib.h"
-#include "base/memory/zalloc.h"
-#include "device_mapper/misc/dm-logging.h"
-#include "daemons/dmeventd/libdevmapper-event.h"
+#include "configure.h"
+#include "libdevmapper-event.h"
#include "dmeventd.h"
-#include "tools/tool.h"
+#include "libdm/misc/dm-logging.h"
+#include "base/memory/zalloc.h"
#include <dlfcn.h>
#include <pthread.h>
@@ -35,6 +34,8 @@
#include <signal.h>
#include <arpa/inet.h> /* for htonl, ntohl */
#include <fcntl.h> /* for musl libc */
+#include <unistd.h>
+#include <syslog.h>
#ifdef __linux__
/*
@@ -62,8 +63,6 @@
#endif
-#include <syslog.h>
-
#define DM_SIGNALED_EXIT 1
#define DM_SCHEDULED_EXIT 2
static volatile sig_atomic_t _exit_now = 0; /* set to '1' when signal is given to exit */
diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c
index 1c4607a..6465f64 100644
--- a/daemons/dmeventd/libdevmapper-event.c
+++ b/daemons/dmeventd/libdevmapper-event.c
@@ -12,11 +12,12 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "device_mapper/misc/dmlib.h"
-#include "base/memory/zalloc.h"
-#include "device_mapper/misc/dm-logging.h"
-#include "daemons/dmeventd/libdevmapper-event.h"
+#include "configure.h"
+#include "libdevmapper-event.h"
#include "dmeventd.h"
+#include "libdm/misc/dm-logging.h"
+#include "base/memory/zalloc.h"
+
#include "lib/misc/intl.h"
#include <fcntl.h>
diff --git a/daemons/dmeventd/libdevmapper-event.h b/daemons/dmeventd/libdevmapper-event.h
index 4c97223..cc65e72 100644
--- a/daemons/dmeventd/libdevmapper-event.h
+++ b/daemons/dmeventd/libdevmapper-event.h
@@ -21,6 +21,7 @@
#ifndef LIB_DMEVENT_H
#define LIB_DMEVENT_H
+#include <stdarg.h>
#include <stdint.h>
/*
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f1684bf8e89b87d7f04e0…
Commit: f1684bf8e89b87d7f04e0a963def66f76634766d
Parent: 859feb81e5b61ac2109b1d7850844ccf1ce3e5bf
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Tue Dec 11 13:58:23 2018 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Fri Dec 14 08:28:02 2018 -0600
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.
---
daemons/lvmdbusd/cmdhandler.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 4fb1670..a9177c5 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -67,7 +67,7 @@ class LvmFlightRecorder(object):
with cmd_lock:
if len(self.queue):
log_error("LVM dbus flight recorder START")
- for c in self.queue:
+ for c in reversed(self.queue):
log_error(str(c))
log_error("LVM dbus flight recorder END")
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=859feb81e5b61ac2109b1…
Commit: 859feb81e5b61ac2109b1d7850844ccf1ce3e5bf
Parent: db6d9e04af7277a5e2883743e0a9a1502d97249f
Author: Ming-Hung Tsai <notifications(a)github.com>
AuthorDate: Fri Dec 14 01:51:51 2018 -0800
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Dec 14 15:23:18 2018 +0100
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.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6856d66..0b7f834 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.03.02 -
===================================
+ Fix missing proper initialization of pv_list struct when adding pv.
Fix (de)activation of RaidLVs with visible SubLVs
Prohibit mirrored 'mirror' log via lvcreate and lvconvert
Use sync io if async io_setup fails, or use_aio=0 is set in config.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 2c569d8..27c40d7 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5962,7 +5962,7 @@ static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg,
if (find_pv_in_pv_list(&spvs->pvs, peg->pv))
return 1;
- if (!(pvl = dm_pool_alloc(cmd->mem, sizeof(*pvl)))) {
+ if (!(pvl = dm_pool_zalloc(cmd->mem, sizeof(*pvl)))) {
log_error("pv_list allocation failed");
return 0;
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=627f0e2bd84753a7bfbda…
Commit: 627f0e2bd84753a7bfbda517f22c54a929e3a458
Parent: dd5716ddf258c4a44819fa90d3356833ccf767b4
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Tue Dec 11 16:54:17 2018 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Tue Dec 11 16:54:17 2018 +0100
man: document 's' RAID attribute bit
---
man/lvs.8_end | 2 ++
man/lvs.8_pregen | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/man/lvs.8_end b/man/lvs.8_end
index f24ffe9..4f83516 100644
--- a/man/lvs.8_end
+++ b/man/lvs.8_end
@@ -56,6 +56,8 @@ Inconsistencies are detected by initiating a "check" on a RAID logical volume.
(The scrubbing operations, "check" and "repair", can be performed on a RAID
logical volume via the 'lvchange' command.) (w)ritemostly signifies the
devices in a RAID 1 logical volume that have been marked write-mostly.
+Re(s)haping signifies a RAID Logical Volume is either undergoing a stripe
+addition/removal, a stripe size or RAID algorithm change.
(R)emove after reshape signifies freed striped raid images to be removed.
.IP
Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index cbc0ed8..377afc2 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -569,6 +569,8 @@ Inconsistencies are detected by initiating a "check" on a RAID logical volume.
(The scrubbing operations, "check" and "repair", can be performed on a RAID
logical volume via the 'lvchange' command.) (w)ritemostly signifies the
devices in a RAID 1 logical volume that have been marked write-mostly.
+Re(s)haping shows a Raid Logical Volume is undergoing a reshape (ie. striped
+ addition/removal, stripe size or RAID algorithm change).
(R)emove after reshape signifies freed striped raid images to be removed.
.IP
Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=edb72cb70cb8abd0acb92…
Commit: edb72cb70cb8abd0acb92f07937715be2816d04a
Parent: a4b8377488f82c496b14ee6d644fc681968acaca
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Dec 7 19:56:49 2018 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Sat Dec 8 02:52:50 2018 +0100
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
---
lib/metadata/mirror.c | 3 ++-
tools/lvconvert.c | 5 -----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index ba3f33d..8b20979 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1908,7 +1908,8 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
}
if (log_count > 1) {
- log_warn("WARNING: Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
+ log_err("Log type \"mirrored\" is DEPRECATED. Use RAID1 LV or disk log instead.");
+ return 0;
}
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 65a4ed3..dbc9fea 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1262,11 +1262,6 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
(old_log_count == new_log_count))
return 1;
- if ((old_log_count != new_log_count) &&
- (new_log_count == MIRROR_LOG_MIRRORED)) {
- log_warn("WARNING: Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
- }
-
if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
new_mimage_count, new_log_count, lp->pvh))
return_0;
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a4b8377488f82c496b14e…
Commit: a4b8377488f82c496b14ee6d644fc681968acaca
Parent: 21784e94d6f4308931fa497679f1a4e5e1966578
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Dec 7 13:11:31 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Dec 7 13:11:31 2018 -0600
lvmlockd: fix missing LV lock for lvconvert repair
Add missing lvmlockd LV lock for lvconvert repair
on mirror and thin/cache pools.
---
tools/lvconvert.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index a29a66b..65a4ed3 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -3534,6 +3534,18 @@ static int _lvconvert_repair_pvs_mirror(struct cmd_context *cmd, struct logical_
int ret;
/*
+ * We want to allow cmirror active on multiple nodes to be repaired,
+ * but normal mirror to only be repaired if active exclusively here.
+ * If the LV is active it already has the necessary lock, but if not
+ * active, then require ex since we cannot know the active state on
+ * other hosts.
+ */
+ if (!lv_is_active(lv)) {
+ if (!lockd_lv(cmd, lv, "ex", 0))
+ return_0;
+ }
+
+ /*
* FIXME: temporary use of lp because _lvconvert_mirrors_repair()
* and _aux() still use lp fields everywhere.
* Migrate them away from using lp (for the most part just use
@@ -3663,6 +3675,10 @@ static int _lvconvert_repair_cachepool_thinpool(struct cmd_context *cmd, struct
int poolmetadataspare = arg_int_value(cmd, poolmetadataspare_ARG, DEFAULT_POOL_METADATA_SPARE);
struct dm_list *use_pvh;
+ /* ensure it's not active elsewhere. */
+ if (!lockd_lv(cmd, lv, "ex", 0))
+ return_0;
+
if (cmd->position_argc > 1) {
/* First pos arg is required LV, remaining are optional PVs. */
if (!(use_pvh = create_pv_list(cmd->mem, lv->vg, cmd->position_argc - 1, cmd->position_argv + 1, 0)))
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f21d9eb8527258479805f…
Commit: f21d9eb8527258479805f5a8132dd9e6e3e572d8
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2018-12-07 14:13 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2018-12-07 14:13 +0000
annotated tag: v2_02_183 has been created
at f21d9eb8527258479805f5a8132dd9e6e3e572d8 (tag)
tagging f5ea02ffee3269a77e295d2b186ca81481f592d7 (commit)
replaces v2_02_182
Release 2.02.183
Bug fix release.
Use sync IO when AIO fails due to system reaching the aio request limit. Add
global/use_aio configuration option to disable aio.
MD RAID verion 0.90 devices are filtered out preventing them to be seen as
duplicate PVs.
Fix regression in dmstats resulting in no output.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJcCoAQAAoJELkRJDHlCQOf6FUP+gNHcULrPp8Tv47Hk6LOOY6x
G6YEkwEmks070B3FPPLGJ49YuGbuiiGhbBdBKajaOiubTStuEc2cFO597kCV8SlX
TwNF9NEGCUy3XyhqAXStZb3nOEZo0pO7ZZsnwlkfEOWb/R+2fcGA+c6SwLUoOwbx
NZYBRCCdaTcVdJhD0qNjz1SrZ5GREQjXDwfSN+uqAw+QwWWWsqZd+hrlM86mEIer
cls2EfhNkEV7UBqi6CS7d9uzQNpLuul//jOmggH1q39rVw7ZxCLv6wPQOVR9Z+xm
T7Do3w2kmy0wsmcdxRcOJ8POeh7nSJApU3owa2BjBEetRwyxfDhdNcsjG52XHCIx
l9PyG6VNvg92FeDVkkOxGLQP9bd76+u4JiRzyzMjYczuCEbbV4Yhwud3MoHA1/fU
E0kD7FWImPIRudS5GR0XRTfZB/hT4LaL0k2RDtMYr2IIfEsixgWEPwMD0P9RrYnS
vTKnAm62oO2TLvkIFq+D5vguEjg9JLz5xV3NV3yZGCe6YiShaz0C0LScmAOCIpq7
YQ2xPBGBKKuYDsA1TEgUXzaPX6qtZQhQ2CC25OR4PL/z2d7eotVlcjNSChZgKOLt
g8j7CKKqgp8R5F5SKPHbGHVtNqkWUYmUQbRSgtFwl0wCTIoFILt0NnbDO9XEVjD3
f7uAulpVklECGeS76zKr
=4F0E
-----END PGP SIGNATURE-----
Bryn M. Reeves (2):
libdm-stats: move no regions warning after dm_stats_list()
dmsetup: fix stats report command output
David Teigland (9):
devices: reuse bcache fd when getting block size
update WHATS_NEW
io: use sync io if aio fails
bcache: sync io fixes
WHATS_NEW: sync io
pvscan lvmetad: use full md filter when md 1.0 devices are present
lvmetad: only disable if repair will do something
lvmetad: fix disabling in previous commit
pvscan lvmetad: use udev info to improve md component detection
Marian Csontos (3):
post-release
build: make generate
pre-release
Peter Rajnoha (1):
scan: md metadata version 0.90 is at the end of disk
Zdenek Kabelac (1):
libdm: do not add params for resume and remove
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=752b1e95f4f12225e6ed9…
Commit: 752b1e95f4f12225e6ed9302f078b3545e758549
Parent: 3d2fd95af78c6f8a34c2d602285bd2230d89b3fd
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Dec 5 11:31:58 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Dec 5 11:31:58 2018 -0600
man lvmlockd: lvextend with gfs2
---
man/lvmlockd.8_main | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/man/lvmlockd.8_main b/man/lvmlockd.8_main
index ebf57da..50b3473 100644
--- a/man/lvmlockd.8_main
+++ b/man/lvmlockd.8_main
@@ -773,6 +773,28 @@ vgchange --lock-type none --lock-opt force <vgname>
After the VG is local, follow the steps described in "changing a local VG
to a shared VG".
+.SS extending an LV active on multiple hosts
+
+With lvmlockd, a new procedure is required to extend an LV while it is
+active on multiple hosts (e.g. when used under gfs2):
+
+1. On one node run the lvextend command:
+.br
+.nf
+ lvextend --lockopt skiplv -L Size VG/LV
+.fi
+
+2. On each node using the LV, refresh the LV:
+.br
+.nf
+ lvchange --refresh VG/LV
+.fi
+
+3. On one node extend gfs2 (or comparable for other applications):
+.br
+.nf
+ gfs2_grow VG/LV
+.fi
.SS limitations of shared VGs
@@ -806,12 +828,12 @@ Visible usage differences between shared VGs (using lvmlockd) and
clvm/clustered VGs (using clvmd):
.IP \[bu] 2
-lvm.conf must be configured to use either lvmlockd (use_lvmlockd=1) or
-clvmd (locking_type=3), but not both.
+lvm.conf is configured to use lvmlockd by setting use_lvmlockd=1.
+clvmd used locking_type=3.
.IP \[bu] 2
-vgcreate --shared creates a shared VG, and vgcreate --clustered y
-creates a clvm/clustered VG.
+vgcreate --shared creates a shared VG. vgcreate --clustered y
+created a clvm/clustered VG.
.IP \[bu] 2
lvmlockd adds the option of using sanlock for locking, avoiding the
@@ -826,9 +848,6 @@ lvmlockd commands always apply to the local host, and never have an effect
on a remote host. (The activation option 'l' is not used.)
.IP \[bu] 2
-lvmlockd works with thin and cache pools and LVs.
-
-.IP \[bu] 2
lvmlockd saves the cluster name for a shared VG using dlm. Only hosts in
the matching cluster can use the VG.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=89c11a2b49182f6858629…
Commit: 89c11a2b49182f6858629857b8c6b3ba126c5970
Parent: c1b2de936cf231c753c4c9f325d33ad5c746709e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Dec 4 12:44:43 2018 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Dec 4 12:44:43 2018 -0600
remove unused lvmetad filter
---
lib/commands/toolcontext.c | 54 +++++++++++++-------------------------------
lib/commands/toolcontext.h | 1 -
2 files changed, 16 insertions(+), 39 deletions(-)
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 754be86..8b2ab4e 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1034,7 +1034,7 @@ static int _init_dev_cache(struct cmd_context *cmd)
#define MAX_FILTERS 10
-static struct dev_filter *_init_lvmetad_filter_chain(struct cmd_context *cmd)
+static struct dev_filter *_init_filter_chain(struct cmd_context *cmd)
{
int nr_filt = 0;
const struct dm_config_node *cn;
@@ -1143,27 +1143,9 @@ bad:
}
/*
- * The way the filtering is initialized depends on whether lvmetad is uesd or not.
- *
- * If lvmetad is used, there are three filter chains:
- *
- * - cmd->lvmetad_filter - the lvmetad filter chain used when scanning devs for lvmetad update:
- * sysfs filter -> internal filter -> global regex filter -> type filter ->
- * usable device filter(FILTER_MODE_PRE_LVMETAD) ->
- * mpath component filter -> partitioned filter ->
- * md component filter -> fw raid filter
- *
- * - cmd->filter - the filter chain used for lvmetad responses:
- * persistent filter -> regex_filter -> usable device filter(FILTER_MODE_POST_LVMETAD)
- *
- * - cmd->full_filter - the filter chain used for all the remaining situations:
- * cmd->lvmetad_filter -> cmd->filter
- *
- * If lvmetad is not used, there's just one filter chain:
- *
- * - cmd->filter == cmd->full_filter:
- * persistent filter -> sysfs filter -> internal filter -> global regex filter ->
- * regex_filter -> type filter -> usable device filter(FILTER_MODE_NO_LVMETAD) ->
+ * cmd->filter ==
+ * persistent(cache) filter -> sysfs filter -> internal filter -> global regex filter ->
+ * regex_filter -> type filter -> usable device filter ->
* mpath component filter -> partitioned filter -> md component filter -> fw raid filter
*
*/
@@ -1176,24 +1158,24 @@ int init_filters(struct cmd_context *cmd, unsigned load_persistent_cache)
return 0;
}
- cmd->lvmetad_filter = _init_lvmetad_filter_chain(cmd);
- if (!cmd->lvmetad_filter)
+ filter = _init_filter_chain(cmd);
+ if (!filter)
goto_bad;
init_ignore_suspended_devices(find_config_tree_bool(cmd, devices_ignore_suspended_devices_CFG, NULL));
init_ignore_lvm_mirrors(find_config_tree_bool(cmd, devices_ignore_lvm_mirrors_CFG, NULL));
/*
- * If lvmetad is used, there's a separation between pre-lvmetad filter chain
- * ("cmd->lvmetad_filter") applied only if scanning for lvmetad update and
- * post-lvmetad filter chain ("filter") applied on each lvmetad response.
- * However, if lvmetad is not used, these two chains are not separated
- * and we use exactly one filter chain during device scanning ("filter"
- * that includes also "cmd->lvmetad_filter" chain).
+ * persisent filter is a cache of the previous result real filter result.
+ * If a dev is found in persistent filter, the pass/fail result saved by
+ * the pfilter is used. If a dev does not existing in the persistent
+ * filter, the dev is passed on to the real filter, and when the result
+ * of the real filter is saved in the persistent filter.
+ *
+ * FIXME: we should apply the filter once at the start of the command,
+ * and not call the filters repeatedly. In that case we would not need
+ * the persistent/caching filter layer.
*/
- filter = cmd->lvmetad_filter;
- cmd->lvmetad_filter = NULL;
-
if (!(pfilter = persistent_filter_create(cmd->dev_types, filter))) {
log_verbose("Failed to create persistent device filter.");
goto bad;
@@ -1223,10 +1205,6 @@ bad:
filter->destroy(filter);
}
- /* if lvmetad is used, the cmd->lvmetad_filter is separate */
- if (cmd->lvmetad_filter)
- cmd->lvmetad_filter->destroy(cmd->lvmetad_filter);
-
cmd->initialized.filters = 0;
return 0;
}
@@ -1858,7 +1836,7 @@ static void _destroy_filters(struct cmd_context *cmd)
{
if (cmd->full_filter) {
cmd->full_filter->destroy(cmd->full_filter);
- cmd->lvmetad_filter = cmd->filter = cmd->full_filter = NULL;
+ cmd->filter = cmd->full_filter = NULL;
}
cmd->initialized.filters = 0;
}
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 2ac7a1e..f820ba1 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -176,7 +176,6 @@ struct cmd_context {
/*
* Filtering.
*/
- struct dev_filter *lvmetad_filter; /* pre-lvmetad filter chain */
struct dev_filter *filter; /* post-lvmetad filter chain */
struct dev_filter *full_filter; /* lvmetad_filter + filter */