Accepting request 521789 from Base:System
1 OBS-URL: https://build.opensuse.org/request/show/521789 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=108
This commit is contained in:
commit
be4b3b6a05
@ -1,31 +0,0 @@
|
||||
From e8d52bf13bc4529172632c49c84a80e315741862 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 19 Aug 2016 16:19:55 +0200
|
||||
Subject: 69-dm-lvm-metad.rules: Do not process rules for multipath devices
|
||||
|
||||
When the device is a multipath device lvm metad should not process
|
||||
it; doing so will reset the 'SYSTEMD_READY' flag and the multipath
|
||||
setup will not work correctly.
|
||||
|
||||
References: bsc#990538, bsc#986734
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.com>
|
||||
---
|
||||
udev/69-dm-lvm-metad.rules.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
|
||||
index f0bfc1e..793a53d 100644
|
||||
--- a/udev/69-dm-lvm-metad.rules.in
|
||||
+++ b/udev/69-dm-lvm-metad.rules.in
|
||||
@@ -17,6 +17,7 @@
|
||||
SUBSYSTEM!="block", GOTO="lvm_end"
|
||||
(LVM_EXEC_RULE)
|
||||
|
||||
+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="lvm_end"
|
||||
ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="lvm_end"
|
||||
|
||||
# If the PV label got lost, inform lvmetad immediately.
|
||||
--
|
||||
2.6.6
|
||||
|
@ -1,44 +0,0 @@
|
||||
From 41c91bba5f696c6b6571218fcbf8bef8b41aa9d9 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 25 Mar 2015 09:44:03 +0100
|
||||
Subject: [PATCH] 13-dm-disk.rules: Import ID_FS_XXX variables from udev
|
||||
database
|
||||
References: bnc#909358
|
||||
|
||||
If the disk is unavailable we need to import the existing ID_FS_XXX
|
||||
variables from the database, otherwise the filesystem UUID won't
|
||||
be set and the by-uuid symlink will disappear, leading to
|
||||
intermittent boot failures.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
|
||||
Index: LVM2.2.02.120/udev/13-dm-disk.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.120.orig/udev/13-dm-disk.rules.in
|
||||
+++ LVM2.2.02.120/udev/13-dm-disk.rules.in
|
||||
@@ -17,15 +17,22 @@ ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1
|
||||
SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace"
|
||||
ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
|
||||
|
||||
-ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
|
||||
+ENV{DM_SUSPENDED}=="1", GOTO="dm_blkid_end"
|
||||
ENV{DM_NR_VALID_PATHS}=="0", GOTO="dm_blkid_end"
|
||||
ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
|
||||
ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end"
|
||||
|
||||
(BLKID_RULE)
|
||||
LABEL="dm_blkid_end"
|
||||
+# For a suspended or otherwise unavailable device we
|
||||
+# need to import the variables from the database, otherwise
|
||||
+# a service interruption might occur
|
||||
+ENV{ID_FS_TYPE}!="?*", IMPORT{db}="ID_FS_TYPE"
|
||||
+ENV{ID_FS_USAGE}!="?*", IMPORT{db}="ID_FS_USAGE"
|
||||
+ENV{ID_FS_UUID}!="?*", IMPORT{db}="ID_FS_UUID"
|
||||
+ENV{ID_FS_UUID_ENC}!="?*", IMPORT{db}="ID_FS_UUID_ENC"
|
||||
+ENV{ID_FS_VERSION}!="?*", IMPORT{db}="ID_FS_VERSION"
|
||||
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
|
||||
-OPTIONS+="watch"
|
||||
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eab09d4132e6ade4db22249e554919045948efb908ffa40409e8e8e0c316f708
|
||||
size 2351684
|
@ -1,7 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.14 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAllT0e4ACgkQIoGRwVZ+LBfVwgCg+QlL7VAkmsIhPczlc+n/1LsT
|
||||
qccAnitUgn6j6QaE6F8faF5NR94JiDgF
|
||||
=hQbN
|
||||
-----END PGP SIGNATURE-----
|
3
LVM2.2.02.173.tgz
Normal file
3
LVM2.2.02.173.tgz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ceb9168c7e009ef487f96a1fe969b23cbb07d920ffb71769affdbdf30fea8d64
|
||||
size 2363504
|
7
LVM2.2.02.173.tgz.asc
Normal file
7
LVM2.2.02.173.tgz.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.14 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAllw138ACgkQIoGRwVZ+LBcXbwCeI1gt2DZhVSuyEN784ynSzaHb
|
||||
VoYAoOOY7HFlESPCTBoFKks4zY/9Ou5D
|
||||
=Na9K
|
||||
-----END PGP SIGNATURE-----
|
@ -1,4 +1,4 @@
|
||||
From e1db89755455dfae9596c648c68a3e731d4419c7 Mon Sep 17 00:00:00 2001
|
||||
From 037eb35169d4a322c3b6d75c5b3491c77c41b4a3 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Ren <zren@suse.com>
|
||||
Date: Sat, 17 Jun 2017 21:32:40 +0800
|
||||
Subject: [PATCH] test: fix read ahead issues in test scripts
|
||||
@ -16,10 +16,10 @@ Signed-off-by: Eric Ren <zren@suse.com>
|
||||
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/test/shell/lvcreate-usage.sh b/test/shell/lvcreate-usage.sh
|
||||
index f7b4704..9001b64 100644
|
||||
index 4b5c2b6..e2e1b8f 100644
|
||||
--- a/test/shell/lvcreate-usage.sh
|
||||
+++ b/test/shell/lvcreate-usage.sh
|
||||
@@ -159,10 +159,10 @@ check lv_field $vg/$lv3 lv_read_ahead "8.00k"
|
||||
@@ -173,10 +173,10 @@ check lv_field $vg/$lv3 lv_read_ahead "8.00k"
|
||||
check lv_field $vg/$lv3 lv_kernel_read_ahead "8.00k"
|
||||
lvcreate -L 8 -n $lv4 --readahead auto $vg
|
||||
check lv_field $vg/$lv4 lv_read_ahead "auto"
|
||||
@ -33,10 +33,10 @@ index f7b4704..9001b64 100644
|
||||
check lv_field $vg/$lv6 lv_read_ahead "auto"
|
||||
check lv_field $vg/$lv6 lv_kernel_read_ahead "512.00k"
|
||||
diff --git a/test/shell/read-ahead.sh b/test/shell/read-ahead.sh
|
||||
index 6e4bd35..3f9a9fd 100644
|
||||
index 9045de8..4a4991b 100644
|
||||
--- a/test/shell/read-ahead.sh
|
||||
+++ b/test/shell/read-ahead.sh
|
||||
@@ -31,11 +31,17 @@ lvchange -r 640 $vg/$lv
|
||||
@@ -32,11 +32,17 @@ lvchange -r 640 $vg/$lv
|
||||
check lv_field $vg/$lv lv_read_ahead 640 --units s --nosuffix
|
||||
lvremove -ff $vg
|
||||
|
||||
@ -46,9 +46,9 @@ index 6e4bd35..3f9a9fd 100644
|
||||
blockdev --setra 768 "$dev1"
|
||||
vgscan
|
||||
lvcreate -n $lv -L4m $vg "$dev1"
|
||||
-test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq 768
|
||||
-test "$(blockdev --getra "$DM_DEV_DIR/$vg/$lv")" -eq 768
|
||||
+if [ "$default_ra" -lt 768 ]; then
|
||||
+ test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq 768
|
||||
+ test "$(blockdev --getra "$DM_DEV_DIR/$vg/$lv")" -eq 768
|
||||
+else
|
||||
+ test $(blockdev --getra "$DM_DEV_DIR/$vg/$lv") -eq "$default_ra"
|
||||
+fi
|
||||
|
@ -1,192 +0,0 @@
|
||||
From 74cfa0a04f51f0629093ac11fafb9c8aba881eee Mon Sep 17 00:00:00 2001
|
||||
From: Eric Ren <zren@suse.com>
|
||||
Date: Tue, 11 Apr 2017 10:58:56 +0800
|
||||
Subject: [PATCH] DM: add dmsetup export
|
||||
|
||||
bsc#479104
|
||||
|
||||
Patch-refreshed-by: Eric Ren <zren@suse.com>
|
||||
---
|
||||
man/dmsetup.8_main | 16 ++++++-
|
||||
tools/dmsetup.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 139 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/dmsetup.8_main b/man/dmsetup.8_main
|
||||
index 4421882..5a31f76 100644
|
||||
--- a/man/dmsetup.8_main
|
||||
+++ b/man/dmsetup.8_main
|
||||
@@ -97,7 +97,15 @@ dmsetup \(em low level logical volume management
|
||||
..
|
||||
.CMD_LOAD
|
||||
.
|
||||
-.HP
|
||||
+. HP
|
||||
+.B dmsetup
|
||||
+.de CMD_EXPORT
|
||||
+. BR export
|
||||
+. RI [device_name]
|
||||
+..
|
||||
+.CMD_EXPORT
|
||||
+.
|
||||
+. HP
|
||||
.B dmsetup
|
||||
.de CMD_LS
|
||||
. ad l
|
||||
@@ -564,6 +572,12 @@ Specify a one-line table directly on the command line.
|
||||
See below for more information on the table format.
|
||||
.
|
||||
.HP
|
||||
+.BR --export
|
||||
+.IR export
|
||||
+.br
|
||||
+Outputs information in key/value format to be imported by other programs.
|
||||
+.
|
||||
+.HP
|
||||
.BR --udevcookie
|
||||
.IR cookie
|
||||
.br
|
||||
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
|
||||
index 5c5c14c..2b0aed6 100644
|
||||
--- a/tools/dmsetup.c
|
||||
+++ b/tools/dmsetup.c
|
||||
@@ -2231,6 +2231,129 @@ static int _status(CMD_ARGS)
|
||||
return r;
|
||||
}
|
||||
|
||||
+static int _export(CMD_ARGS)
|
||||
+{
|
||||
+ int r = 0;
|
||||
+ struct dm_task *dmt = NULL;
|
||||
+ void *next = NULL;
|
||||
+ uint64_t start, length;
|
||||
+ char *target_type = NULL;
|
||||
+ char *params;
|
||||
+ const char *name = NULL;
|
||||
+ const char *old_name = NULL;
|
||||
+ const char *uuid = NULL;
|
||||
+ struct dm_info info;
|
||||
+ struct dm_deps *deps;
|
||||
+
|
||||
+ if (names)
|
||||
+ name = names->name;
|
||||
+ else if (argc == 2)
|
||||
+ name = argv[1];
|
||||
+ old_name = name;
|
||||
+
|
||||
+ if (!(dmt = dm_task_create(DM_DEVICE_STATUS)))
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!_set_task_device(dmt, name, 0))
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!dm_task_run(dmt))
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!dm_task_get_info(dmt, &info) || !info.exists)
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!name)
|
||||
+ name = dm_task_get_name(dmt);
|
||||
+
|
||||
+ uuid = dm_task_get_uuid(dmt);
|
||||
+ printf("DM_NAME=%s\n", name);
|
||||
+
|
||||
+ if ((uuid = dm_task_get_uuid(dmt)) && *uuid)
|
||||
+ printf("DM_UUID=%s\n", uuid);
|
||||
+
|
||||
+ if (!info.exists) {
|
||||
+ printf("DM_STATE=NOTPRESENT\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (!name)
|
||||
+ name = dm_task_get_name(dmt);
|
||||
+
|
||||
+ uuid = dm_task_get_uuid(dmt);
|
||||
+ printf("DM_NAME=%s\n", name);
|
||||
+
|
||||
+ if ((uuid = dm_task_get_uuid(dmt)) && *uuid)
|
||||
+ printf("DM_UUID=%s\n", uuid);
|
||||
+
|
||||
+ if (!info.exists) {
|
||||
+ printf("DM_STATE=NOTPRESENT\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ printf("DM_STATE=%s\n",
|
||||
+ info.suspended ? "SUSPENDED" :
|
||||
+ (info.read_only ? "READONLY" : "ACTIVE"));
|
||||
+
|
||||
+ if (!info.live_table && !info.inactive_table)
|
||||
+ printf("DM_TABLE_STATE=NONE\n");
|
||||
+ else
|
||||
+ printf("DM_TABLE_STATE=%s%s%s\n",
|
||||
+ info.live_table ? "LIVE" : "",
|
||||
+ info.live_table && info.inactive_table ? "/" : "",
|
||||
+ info.inactive_table ? "INACTIVE" : "");
|
||||
+
|
||||
+ if (info.open_count != -1)
|
||||
+ printf("DM_OPENCOUNT=%d\n", info.open_count);
|
||||
+
|
||||
+ printf("DM_LAST_EVENT_NR=%" PRIu32 "\n", info.event_nr);
|
||||
+
|
||||
+ printf("DM_MAJOR=%d\n", info.major);
|
||||
+ printf("DM_MINOR=%d\n", info.minor);
|
||||
+
|
||||
+ if (info.target_count != -1)
|
||||
+ printf("DM_TARGET_COUNT=%d\n", info.target_count);
|
||||
+
|
||||
+ /* export all table types */
|
||||
+ next = dm_get_next_target(dmt, next, &start, &length,
|
||||
+ &target_type, ¶ms);
|
||||
+ if (target_type) {
|
||||
+ printf("DM_TARGET_TYPES=%s", target_type);
|
||||
+ while (next) {
|
||||
+ next = dm_get_next_target(dmt, next, &start, &length,
|
||||
+ &target_type, ¶ms);
|
||||
+ if (target_type)
|
||||
+ printf(",%s", target_type);
|
||||
+ }
|
||||
+ printf("\n");
|
||||
+ }
|
||||
+
|
||||
+ dm_task_destroy(dmt);
|
||||
+
|
||||
+ // bnc#707614, revert to the original name
|
||||
+
|
||||
+ if (!(dmt = dm_task_create(DM_DEVICE_DEPS)))
|
||||
+ goto out;
|
||||
+
|
||||
+ name = old_name;
|
||||
+ if (!_set_task_device(dmt, name, 0))
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!dm_task_run(dmt))
|
||||
+ goto out;
|
||||
+
|
||||
+ if (!(deps = dm_task_get_deps(dmt)))
|
||||
+ goto out;
|
||||
+
|
||||
+ printf("DM_DEPS=%d\n", deps->count);
|
||||
+
|
||||
+ r = 1;
|
||||
+ out:
|
||||
+ if (dmt)
|
||||
+ dm_task_destroy(dmt);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
/* Show target names and their version numbers */
|
||||
static int _targets(CMD_ARGS)
|
||||
{
|
||||
@@ -5903,6 +6026,7 @@ static struct command _dmsetup_commands[] = {
|
||||
{"deps", "[-o <options>] [<device>...]", 0, -1, 1, 0, _deps},
|
||||
{"stats", "<command> [<options>] [<device>...]", 1, -1, 1, 1, _stats},
|
||||
{"status", "[<device>...] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status},
|
||||
+ {"export", "[<device>]", 0, -1, 1, 0, _export},
|
||||
{"table", "[<device>...] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status},
|
||||
{"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, 0, _wait},
|
||||
{"mknodes", "[<device>...]", 0, -1, 1, 0, _mknodes},
|
||||
--
|
||||
2.10.2
|
||||
|
@ -1,45 +0,0 @@
|
||||
Index: LVM2.2.02.152/libdm/datastruct/hash.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/libdm/datastruct/hash.c
|
||||
+++ LVM2.2.02.152/libdm/datastruct/hash.c
|
||||
@@ -20,7 +20,7 @@ struct dm_hash_node {
|
||||
void *data;
|
||||
unsigned data_len;
|
||||
unsigned keylen;
|
||||
- char key[0];
|
||||
+ unsigned char key[0];
|
||||
};
|
||||
|
||||
struct dm_hash_table {
|
||||
@@ -137,7 +137,7 @@ void dm_hash_destroy(struct dm_hash_tabl
|
||||
static struct dm_hash_node **_find(struct dm_hash_table *t, const void *key,
|
||||
uint32_t len)
|
||||
{
|
||||
- unsigned h = _hash(key, len) & (t->num_slots - 1);
|
||||
+ unsigned h = _hash((unsigned char *)key, len) & (t->num_slots - 1);
|
||||
struct dm_hash_node **c;
|
||||
|
||||
for (c = &t->slots[h]; *c; c = &((*c)->next)) {
|
||||
@@ -361,7 +361,8 @@ void dm_hash_wipe(struct dm_hash_table *
|
||||
char *dm_hash_get_key(struct dm_hash_table *t __attribute__((unused)),
|
||||
struct dm_hash_node *n)
|
||||
{
|
||||
- return n->key;
|
||||
+ return (char *)n->key;
|
||||
+
|
||||
}
|
||||
|
||||
void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)),
|
||||
Index: LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/libdm/ioctl/libdm-iface.c
|
||||
+++ LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
||||
@@ -1834,7 +1834,7 @@ static struct dm_ioctl *_do_dm_ioctl(str
|
||||
dmt->secure_data ? "securedata " : "",
|
||||
dmt->query_inactive_table ? "inactive " : "",
|
||||
dmt->enable_checks ? "enablechecks " : "",
|
||||
- dmt->sector, _sanitise_message(dmt->message),
|
||||
+ (unsigned long long int)dmt->sector, _sanitise_message(dmt->message),
|
||||
dmi->data_size, retry_repeat_count);
|
||||
#ifdef DM_IOCTLS
|
||||
r = ioctl(_control_fd, command, dmi);
|
@ -1,18 +0,0 @@
|
||||
From: Hannes Reinecke <hare@suse.com>
|
||||
Subject: Use type-punning for device-mapper type
|
||||
|
||||
---
|
||||
lib/device/device.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- LVM2.2.02.98.orig/lib/device/dev-type.c
|
||||
+++ LVM2.2.02.98/lib/device/dev-type.c
|
||||
@@ -39,7 +39,7 @@ struct partition {
|
||||
uint8_t end_cyl;
|
||||
uint32_t start_sect;
|
||||
uint32_t nr_sects;
|
||||
-} __attribute__((packed));
|
||||
+} __attribute__((packed,may_alias));
|
||||
|
||||
static int _is_partitionable(struct dev_types *dt, struct device *dev)
|
||||
{
|
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 18 09:53:39 UTC 2017 - mwilck@suse.com
|
||||
|
||||
- Dropped udev rule patches (bsc#1054363)
|
||||
* dropped udev_rules-update.diff
|
||||
* dropped device-mapper-dmsetup-export.patch
|
||||
* dropped udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
* dropped Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
* dropped 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 1 05:59:29 UTC 2017 - zren@suse.com
|
||||
|
||||
- Dropped several not-upstreamed patches, some of them neither have
|
||||
history reference nor patch header, some were temporary workaround
|
||||
fix.
|
||||
- device-mapper-gcc-warnings.patch
|
||||
- device-mapper-type_punning.diff
|
||||
- fix-closedown-before-thread-finish.patch
|
||||
- libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
- pvcreate-enhance-the-error-message.patch
|
||||
- pvmove_support_clustered_vg.diff
|
||||
- version-plugins-in-libdir.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 13:48:00 UTC 2017 - zren@suse.com
|
||||
|
||||
- Update to LVM2.2.02.173
|
||||
- Sync our lvm.conf with V2.02.173
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 13 13:09:35 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
%define libname libdevmapper1_03
|
||||
%define libname_event libdevmapper-event1_03
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.172
|
||||
%define device_mapper_version 1.02.141
|
||||
%define lvm2_version 2.02.173
|
||||
%define device_mapper_version 1.02.142
|
||||
%define thin_provisioning_version 0.7.0
|
||||
### COMMON-DEF-END ###
|
||||
Name: device-mapper
|
||||
@ -53,50 +53,26 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Patch1001: cmirrord_remove_date_time_from_compilation.patch
|
||||
#fate#309425
|
||||
Patch1002: display-dm-name-for-lv-name.diff
|
||||
# no reference
|
||||
Patch1003: device-mapper-type_punning.diff
|
||||
#fate#312248
|
||||
Patch1004: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1005: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1003: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1004: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
#fate#315092
|
||||
Patch1006: cmirrord_improvment_performance.patch
|
||||
Patch1005: cmirrord_improvment_performance.patch
|
||||
#fate#314367
|
||||
Patch1007: cluster_support_mirrord_log.diff
|
||||
Patch1008: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
# no reference
|
||||
Patch1009: pvmove_support_clustered_vg.diff
|
||||
Patch1006: cluster_support_mirrord_log.diff
|
||||
Patch1007: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
#FATE#318413
|
||||
Patch1010: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#960744
|
||||
Patch1011: pvcreate-enhance-the-error-message.patch
|
||||
#bnc873538
|
||||
Patch1012: fix-closedown-before-thread-finish.patch
|
||||
Patch1008: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#870824
|
||||
Patch1013: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
# no reference
|
||||
Patch1014: version-plugins-in-libdir.patch
|
||||
Patch1009: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
#bsc#935623
|
||||
Patch1015: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1010: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
#bsc#960044
|
||||
Patch1016: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
Patch1011: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
|
||||
#SUSE patches 2000+ for device mapper, udev rules
|
||||
#bsc#479104,bnc#707253
|
||||
Patch2001: device-mapper-dmsetup-export.patch
|
||||
#bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2002: udev_rules-update.diff
|
||||
#bnc#875233
|
||||
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
#bnc909358
|
||||
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
#bsc#940298
|
||||
Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
#bnc#990538,bnc#986734
|
||||
Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
#bsc#1012973
|
||||
Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
# no reference
|
||||
Patch2008: device-mapper-gcc-warnings.patch
|
||||
Patch2006: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
### COMMON-PATCH-END ###
|
||||
|
||||
%description
|
||||
@ -116,19 +92,7 @@ Programs and man pages for configuring and using the device mapper.
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%build
|
||||
|
@ -1,102 +0,0 @@
|
||||
---
|
||||
daemons/clvmd/clvmd-corosync.c | 6 +++-
|
||||
daemons/clvmd/clvmd.c | 53 ++++++++++++++++++++++++++++++++++++++++-
|
||||
daemons/clvmd/clvmd.h | 2 +
|
||||
3 files changed, 59 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/daemons/clvmd/clvmd-corosync.c
|
||||
+++ b/daemons/clvmd/clvmd-corosync.c
|
||||
@@ -251,8 +251,12 @@ static void corosync_cpg_confchg_callbac
|
||||
ninfo = dm_hash_lookup_binary(node_hash,
|
||||
(char *)&left_list[i].nodeid,
|
||||
COROSYNC_CSID_LEN);
|
||||
- if (ninfo)
|
||||
+ if (ninfo) {
|
||||
ninfo->state = NODE_DOWN;
|
||||
+ char name[MAX_CLUSTER_MEMBER_NAME_LEN];
|
||||
+ sprintf(name, "%x", ninfo->nodeid);
|
||||
+ decrease_inflight_expected_reply(name);
|
||||
+ }
|
||||
}
|
||||
|
||||
num_nodes = member_list_entries;
|
||||
--- a/daemons/clvmd/clvmd.c
|
||||
+++ b/daemons/clvmd/clvmd.c
|
||||
@@ -1613,6 +1613,57 @@ static void process_remote_command(struc
|
||||
dm_free(replyargs);
|
||||
}
|
||||
|
||||
+void decrease_inflight_expected_reply(const char *nodename)
|
||||
+{
|
||||
+ struct local_client *thisfd;
|
||||
+ struct node_reply *reply;
|
||||
+
|
||||
+ DEBUGLOG("remote node %s down", nodename);
|
||||
+
|
||||
+ for (thisfd = &local_client_head; thisfd != NULL;
|
||||
+ thisfd = thisfd->next) {
|
||||
+ /* in-flight request */
|
||||
+ if (thisfd->type == LOCAL_SOCK &&
|
||||
+ thisfd->bits.localsock.sent_out &&
|
||||
+ thisfd->bits.localsock.in_progress &&
|
||||
+ !thisfd->bits.localsock.finished &&
|
||||
+ thisfd->bits.localsock.expected_replies >
|
||||
+ thisfd->bits.localsock.num_replies) {
|
||||
+
|
||||
+ pthread_mutex_lock(&thisfd->bits.localsock.mutex);
|
||||
+
|
||||
+ reply = thisfd->bits.localsock.replies;
|
||||
+ while (reply && strcmp(reply->node, nodename) != 0) {
|
||||
+ reply = reply->next;
|
||||
+ }
|
||||
+ /*
|
||||
+ * if the remote down server has replies,
|
||||
+ * do not decrease the expected_replies
|
||||
+ */
|
||||
+ if (reply)
|
||||
+ continue;
|
||||
+
|
||||
+ thisfd->bits.localsock.expected_replies--;
|
||||
+ DEBUGLOG("remote node down, decrement the expected replies to (%d), num_replies(%d)",
|
||||
+ thisfd->bits.localsock.expected_replies,
|
||||
+ thisfd->bits.localsock.num_replies);
|
||||
+
|
||||
+ if (thisfd->bits.localsock.expected_replies <=
|
||||
+ thisfd->bits.localsock.num_replies) {
|
||||
+ /* tell pre_and_post thread to finish */
|
||||
+ if (thisfd->bits.localsock.threadid) {
|
||||
+ thisfd->bits.localsock.all_success = 0;
|
||||
+ pthread_mutex_lock(&thisfd->bits.localsock.mutex);
|
||||
+ thisfd->bits.localsock.state = POST_COMMAND;
|
||||
+ pthread_cond_signal(&thisfd->bits.localsock.cond);
|
||||
+ pthread_mutex_unlock(&thisfd->bits.localsock.mutex);
|
||||
+ }
|
||||
+ }
|
||||
+ pthread_mutex_unlock(&thisfd->bits.localsock.mutex);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* Add a reply to a command to the list of replies for this client.
|
||||
If we have got a full set then send them to the waiting client down the local
|
||||
socket */
|
||||
@@ -1652,7 +1703,7 @@ static void add_reply_to_list(struct loc
|
||||
|
||||
/* If we have the whole lot then do the post-process */
|
||||
/* Post-process the command */
|
||||
- if (++client->bits.localsock.num_replies ==
|
||||
+ if (++client->bits.localsock.num_replies >=
|
||||
client->bits.localsock.expected_replies) {
|
||||
client->bits.localsock.state = POST_COMMAND;
|
||||
pthread_cond_signal(&client->bits.localsock.cond);
|
||||
--- a/daemons/clvmd/clvmd.h
|
||||
+++ b/daemons/clvmd/clvmd.h
|
||||
@@ -110,6 +110,8 @@ extern int do_post_command(struct local_
|
||||
extern void cmd_client_cleanup(struct local_client *client);
|
||||
extern int add_client(struct local_client *new_client);
|
||||
|
||||
+
|
||||
+extern void decrease_inflight_expected_reply(const char *nodename);
|
||||
extern void clvmd_cluster_init_completed(void);
|
||||
extern void process_message(struct local_client *client, char *buf,
|
||||
int len, const char *csid);
|
@ -1,32 +1,19 @@
|
||||
From cdb0d133b17a8c590f4b7458dbea81cdd4b4ed26 Mon Sep 17 00:00:00 2001
|
||||
From ecc163a3cb10a8ad89a445ec9d6fdb5a30c380de Mon Sep 17 00:00:00 2001
|
||||
From: Eric Ren <zren@suse.com>
|
||||
Date: Thu, 6 Jul 2017 17:42:58 +0800
|
||||
Subject: [Patch v2] fsadm: add support for btrfs
|
||||
Subject: [PATCH] fsadm: add support for btrfs
|
||||
|
||||
Check: mount the device first and then run`btrfs filesystem scrub start
|
||||
-B` command
|
||||
Reisze: find the mount point first and resize the filesystem after get
|
||||
the device id since there are maybe several devices underneath btrfs
|
||||
filesystem
|
||||
|
||||
---
|
||||
Hi David,
|
||||
|
||||
This is the patch I sent to upstream. It works fine based on our
|
||||
test.
|
||||
Please shed your light and thank you for taking time to review.
|
||||
|
||||
Regards,
|
||||
Lidong
|
||||
|
||||
Signed-off-by: Lidong Zhong <lzhong@suse.com>
|
||||
Refreshed-by: Eric Ren <zren@suse.com>
|
||||
---
|
||||
scripts/fsadm.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 72 insertions(+), 4 deletions(-)
|
||||
scripts/fsadm.sh | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 71 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
|
||||
index adf9b55..00ccc73 100755
|
||||
index 459905f..1219549 100755
|
||||
--- a/scripts/fsadm.sh
|
||||
+++ b/scripts/fsadm.sh
|
||||
@@ -22,6 +22,7 @@
|
||||
@ -55,15 +42,6 @@ index adf9b55..00ccc73 100755
|
||||
PROCDIR="/proc"
|
||||
PROCMOUNTS="$PROCDIR/mounts"
|
||||
PROCSELFMOUNTINFO="$PROCDIR/self/mountinfo"
|
||||
@@ -152,7 +157,7 @@ cleanup() {
|
||||
export _FSADM_YES _FSADM_EXTOFF
|
||||
unset FSADM_RUNNING
|
||||
test -n "$LVM_BINARY" && PATH=$_SAVEPATH
|
||||
- dry exec "$LVM" lvresize $VERB $FORCE -r -L${NEWSIZE}b "$VOLUME_ORIG"
|
||||
+ dry exec "$LVM" lvresize $VERB $FORCE -r -L${NEWSIZE}b "$VOLUME"
|
||||
fi
|
||||
|
||||
# error exit status for break
|
||||
@@ -225,6 +230,33 @@ detect_fs() {
|
||||
verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"."
|
||||
}
|
||||
@ -98,7 +76,7 @@ index adf9b55..00ccc73 100755
|
||||
|
||||
# Check that passed mounted MAJOR:MINOR is not matching $MAJOR:MINOR of resized $VOLUME
|
||||
validate_mounted_major_minor() {
|
||||
@@ -348,8 +380,12 @@ detect_mounted_with_proc_mounts() {
|
||||
@@ -352,8 +384,12 @@ detect_mounted_with_proc_mounts() {
|
||||
|
||||
# check if the given device is already mounted and where
|
||||
# FIXME: resolve swap usage and device stacking
|
||||
@ -113,7 +91,7 @@ index adf9b55..00ccc73 100755
|
||||
detect_mounted_with_proc_self_mountinfo
|
||||
elif test -e "$PROCMOUNTS"; then
|
||||
detect_mounted_with_proc_mounts
|
||||
@@ -514,6 +550,31 @@ resize_xfs() {
|
||||
@@ -520,6 +556,31 @@ resize_xfs() {
|
||||
fi
|
||||
}
|
||||
|
||||
@ -145,7 +123,7 @@ index adf9b55..00ccc73 100755
|
||||
####################
|
||||
# Resize filesystem
|
||||
####################
|
||||
@@ -530,6 +591,7 @@ resize() {
|
||||
@@ -536,6 +597,7 @@ resize() {
|
||||
"ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;;
|
||||
"reiserfs") resize_reiser $NEWSIZE ;;
|
||||
"xfs") resize_xfs $NEWSIZE ;;
|
||||
@ -153,7 +131,7 @@ index adf9b55..00ccc73 100755
|
||||
*) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;;
|
||||
esac || error "Resize $FSTYPE failed."
|
||||
cleanup 0
|
||||
@@ -587,6 +649,12 @@ check() {
|
||||
@@ -593,6 +655,12 @@ check() {
|
||||
# Think about better way....
|
||||
dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME"
|
||||
fi ;;
|
||||
@ -166,7 +144,7 @@ index adf9b55..00ccc73 100755
|
||||
*) # check if executed from interactive shell environment
|
||||
case "$-" in
|
||||
*i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;;
|
||||
@@ -608,7 +676,7 @@ test -n "$FSADM_RUNNING" && exit 0
|
||||
@@ -614,7 +682,7 @@ test -n "$FSADM_RUNNING" && exit 0
|
||||
for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
|
||||
"$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
|
||||
"$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 3c4d9dd3571e89545d97c8421fd4cbdbaa6895b8 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Ren <zren@suse.com>
|
||||
Date: Tue, 11 Apr 2017 11:09:26 +0800
|
||||
Subject: [PATCH] libdm-iface: not output error message inside retry loops
|
||||
|
||||
This is a workaround to avoid noisy error message being output inside
|
||||
retry loops
|
||||
in case of remove failure because device busy. But as to the replies
|
||||
from upstream
|
||||
there may be some issues in udev operations.
|
||||
|
||||
References: bsc#940298 boo#957059
|
||||
Signed-off-by: lwang@suse.com
|
||||
Patch-refreshed-by: Eric Ren <zren@suse.com>
|
||||
---
|
||||
libdm/ioctl/libdm-iface.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
|
||||
index cb3e8dc..c1c0771 100644
|
||||
--- a/libdm/ioctl/libdm-iface.c
|
||||
+++ b/libdm/ioctl/libdm-iface.c
|
||||
@@ -62,6 +62,7 @@
|
||||
*/
|
||||
#define MAPPER_CTRL_MINOR 236
|
||||
#define MISC_MAJOR 10
|
||||
+#define DM_IOCTL_RETRIES 25
|
||||
|
||||
/* dm major version no for running kernel */
|
||||
static unsigned _dm_version = DM_VERSION_MAJOR;
|
||||
@@ -1862,8 +1863,8 @@ static struct dm_ioctl *_do_dm_ioctl(struct dm_task *dmt, unsigned command,
|
||||
dmt->major > 0 && dmt->minor == 0 ? "0" : "",
|
||||
dmt->major > 0 ? ")" : "",
|
||||
strerror(dmt->ioctl_errno));
|
||||
- else
|
||||
- log_error("device-mapper: %s ioctl on %s %s%s%.0d%s%.0d%s%s "
|
||||
+ else if(errno != EBUSY || retry_repeat_count == DM_IOCTL_RETRIES)
|
||||
+ log_error("device-mapper: %s ioctl on %s%s%s%.0d%s%.0d%s%s "
|
||||
"failed: %s",
|
||||
_cmd_data_v4[dmt->type].name,
|
||||
dmi->name, dmi->uuid,
|
||||
@@ -1915,7 +1916,6 @@ void dm_task_update_nodes(void)
|
||||
update_devs();
|
||||
}
|
||||
|
||||
-#define DM_IOCTL_RETRIES 25
|
||||
#define DM_RETRY_USLEEP_DELAY 200000
|
||||
|
||||
int dm_task_get_errno(struct dm_task *dmt)
|
||||
--
|
||||
2.10.2
|
||||
|
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 18 09:53:39 UTC 2017 - mwilck@suse.com
|
||||
|
||||
- Dropped udev rule patches (bsc#1054363)
|
||||
* dropped udev_rules-update.diff
|
||||
* dropped device-mapper-dmsetup-export.patch
|
||||
* dropped udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
* dropped Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
* dropped 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 1 05:59:29 UTC 2017 - zren@suse.com
|
||||
|
||||
- Dropped several not-upstreamed patches, some of them neither have
|
||||
history reference nor patch header, some were temporary workaround
|
||||
fix.
|
||||
- device-mapper-gcc-warnings.patch
|
||||
- device-mapper-type_punning.diff
|
||||
- fix-closedown-before-thread-finish.patch
|
||||
- libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
- pvcreate-enhance-the-error-message.patch
|
||||
- pvmove_support_clustered_vg.diff
|
||||
- version-plugins-in-libdir.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 13:48:00 UTC 2017 - zren@suse.com
|
||||
|
||||
- Update to LVM2.2.02.173
|
||||
- Sync our lvm.conf with V2.02.173
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 13 13:09:35 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
%define dlm_version 3.99.1
|
||||
%define sanlock_version 3.3.0
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.172
|
||||
%define device_mapper_version 1.02.141
|
||||
%define lvm2_version 2.02.173
|
||||
%define device_mapper_version 1.02.142
|
||||
%define thin_provisioning_version 0.7.0
|
||||
### COMMON-DEF-END ###
|
||||
Name: lvm2-clvm
|
||||
@ -56,50 +56,26 @@ Provides: cmirrord = %{version}
|
||||
Patch1001: cmirrord_remove_date_time_from_compilation.patch
|
||||
#fate#309425
|
||||
Patch1002: display-dm-name-for-lv-name.diff
|
||||
# no reference
|
||||
Patch1003: device-mapper-type_punning.diff
|
||||
#fate#312248
|
||||
Patch1004: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1005: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1003: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1004: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
#fate#315092
|
||||
Patch1006: cmirrord_improvment_performance.patch
|
||||
Patch1005: cmirrord_improvment_performance.patch
|
||||
#fate#314367
|
||||
Patch1007: cluster_support_mirrord_log.diff
|
||||
Patch1008: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
# no reference
|
||||
Patch1009: pvmove_support_clustered_vg.diff
|
||||
Patch1006: cluster_support_mirrord_log.diff
|
||||
Patch1007: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
#FATE#318413
|
||||
Patch1010: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#960744
|
||||
Patch1011: pvcreate-enhance-the-error-message.patch
|
||||
#bnc873538
|
||||
Patch1012: fix-closedown-before-thread-finish.patch
|
||||
Patch1008: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#870824
|
||||
Patch1013: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
# no reference
|
||||
Patch1014: version-plugins-in-libdir.patch
|
||||
Patch1009: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
#bsc#935623
|
||||
Patch1015: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1010: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
#bsc#960044
|
||||
Patch1016: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
Patch1011: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
|
||||
#SUSE patches 2000+ for device mapper, udev rules
|
||||
#bsc#479104,bnc#707253
|
||||
Patch2001: device-mapper-dmsetup-export.patch
|
||||
#bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2002: udev_rules-update.diff
|
||||
#bnc#875233
|
||||
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
#bnc909358
|
||||
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
#bsc#940298
|
||||
Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
#bnc#990538,bnc#986734
|
||||
Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
#bsc#1012973
|
||||
Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
# no reference
|
||||
Patch2008: device-mapper-gcc-warnings.patch
|
||||
Patch2006: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
### COMMON-PATCH-END ###
|
||||
|
||||
%description
|
||||
@ -120,19 +96,7 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%build
|
||||
|
30
lvm2.changes
30
lvm2.changes
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 18 09:53:39 UTC 2017 - mwilck@suse.com
|
||||
|
||||
- Dropped udev rule patches (bsc#1054363)
|
||||
* dropped udev_rules-update.diff
|
||||
* dropped device-mapper-dmsetup-export.patch
|
||||
* dropped udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
* dropped Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
* dropped 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 1 05:59:29 UTC 2017 - zren@suse.com
|
||||
|
||||
- Dropped several not-upstreamed patches, some of them neither have
|
||||
history reference nor patch header, some were temporary workaround
|
||||
fix.
|
||||
- device-mapper-gcc-warnings.patch
|
||||
- device-mapper-type_punning.diff
|
||||
- fix-closedown-before-thread-finish.patch
|
||||
- libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
- pvcreate-enhance-the-error-message.patch
|
||||
- pvmove_support_clustered_vg.diff
|
||||
- version-plugins-in-libdir.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 13:48:00 UTC 2017 - zren@suse.com
|
||||
|
||||
- Update to LVM2.2.02.173
|
||||
- Sync our lvm.conf with V2.02.173
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 13 13:09:35 UTC 2017 - tchvatal@suse.com
|
||||
|
||||
|
60
lvm2.spec
60
lvm2.spec
@ -21,8 +21,8 @@
|
||||
%define cmdlib liblvm2cmd2_02
|
||||
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.172
|
||||
%define device_mapper_version 1.02.141
|
||||
%define lvm2_version 2.02.173
|
||||
%define device_mapper_version 1.02.142
|
||||
%define thin_provisioning_version 0.7.0
|
||||
### COMMON-DEF-END ###
|
||||
|
||||
@ -64,50 +64,26 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Patch1001: cmirrord_remove_date_time_from_compilation.patch
|
||||
#fate#309425
|
||||
Patch1002: display-dm-name-for-lv-name.diff
|
||||
# no reference
|
||||
Patch1003: device-mapper-type_punning.diff
|
||||
#fate#312248
|
||||
Patch1004: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1005: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1003: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1004: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
#fate#315092
|
||||
Patch1006: cmirrord_improvment_performance.patch
|
||||
Patch1005: cmirrord_improvment_performance.patch
|
||||
#fate#314367
|
||||
Patch1007: cluster_support_mirrord_log.diff
|
||||
Patch1008: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
# no reference
|
||||
Patch1009: pvmove_support_clustered_vg.diff
|
||||
Patch1006: cluster_support_mirrord_log.diff
|
||||
Patch1007: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
#FATE#318413
|
||||
Patch1010: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#960744
|
||||
Patch1011: pvcreate-enhance-the-error-message.patch
|
||||
#bnc873538
|
||||
Patch1012: fix-closedown-before-thread-finish.patch
|
||||
Patch1008: fsadm-add-support-for-btrfs.patch
|
||||
#bnc#870824
|
||||
Patch1013: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
# no reference
|
||||
Patch1014: version-plugins-in-libdir.patch
|
||||
Patch1009: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
#bsc#935623
|
||||
Patch1015: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1010: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
#bsc#960044
|
||||
Patch1016: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
Patch1011: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
|
||||
#SUSE patches 2000+ for device mapper, udev rules
|
||||
#bsc#479104,bnc#707253
|
||||
Patch2001: device-mapper-dmsetup-export.patch
|
||||
#bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2002: udev_rules-update.diff
|
||||
#bnc#875233
|
||||
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
#bnc909358
|
||||
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
#bsc#940298
|
||||
Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
#bnc#990538,bnc#986734
|
||||
Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
|
||||
#bsc#1012973
|
||||
Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
# no reference
|
||||
Patch2008: device-mapper-gcc-warnings.patch
|
||||
Patch2006: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
|
||||
### COMMON-PATCH-END ###
|
||||
|
||||
# 3000+ for test code
|
||||
@ -137,19 +113,7 @@ Volume Manager.
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%patch3001 -p1
|
||||
|
@ -1,28 +0,0 @@
|
||||
From b8b35c35a17b95e83817f262d70cb7a7d45cb192 Mon Sep 17 00:00:00 2001
|
||||
From: Liuhua Wang <lwang@suse.com>
|
||||
Date: Mon, 29 Feb 2016 20:08:00 +0800
|
||||
Subject: [PATCH] pvcreate enhance the error message
|
||||
|
||||
Signed-off-by: Liuhua Wang(lwang@suse.com)
|
||||
References: bsc#960744
|
||||
---
|
||||
lib/metadata/metadata.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
|
||||
index 19741ba..9f098ca 100644
|
||||
--- a/lib/metadata/metadata.c
|
||||
+++ b/lib/metadata/metadata.c
|
||||
@@ -1483,7 +1483,8 @@ static int _pvcreate_check(struct cmd_context *cmd, const char *name,
|
||||
filter_refresh_needed = scan_needed = 1;
|
||||
|
||||
if (!dev) {
|
||||
- log_error("Device %s not found (or ignored by filtering).", name);
|
||||
+ log_error("Device %s not found (or ignored by filtering). "
|
||||
+ "Please run with -vvv option for more details", name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.4.5
|
||||
|
@ -1,51 +0,0 @@
|
||||
---
|
||||
lib/activate/activate.c | 30 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
Index: LVM2.2.02.155/lib/activate/activate.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.155.orig/lib/activate/activate.c
|
||||
+++ LVM2.2.02.155/lib/activate/activate.c
|
||||
@@ -621,6 +621,26 @@ int module_present(struct cmd_context *c
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/* 0 on not running, 1 on running */
|
||||
+static int check_cmirrord(void)
|
||||
+{
|
||||
+ int fd;
|
||||
+ int ret = 0;
|
||||
+ struct flock lock;
|
||||
+ if (( fd = open("/var/run/cmirrord.pid", O_WRONLY)) >= 0)
|
||||
+ {
|
||||
+ lock.l_type = F_WRLCK;
|
||||
+ lock.l_start = 0;
|
||||
+ lock.l_whence = SEEK_SET;
|
||||
+ lock.l_len = 0;
|
||||
+ if (fcntl(fd, F_SETLK, &lock) < 0) {
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int target_present_version(struct cmd_context *cmd, const char *target_name,
|
||||
int use_modprobe,
|
||||
uint32_t *maj, uint32_t *min, uint32_t *patchlevel)
|
||||
@@ -629,6 +649,15 @@ int target_present_version(struct cmd_co
|
||||
log_error(INTERNAL_ERROR "Target present version called when activation is disabled.");
|
||||
return 0;
|
||||
}
|
||||
+ if (!strncmp(target_name, "log-userspace", 13)) {
|
||||
+ /*
|
||||
+ When the target_name is log-userspace, it also means
|
||||
+ we need cmirrord daemon running. It doesn't work alone.
|
||||
+ */
|
||||
+ if (!check_cmirrord())
|
||||
+ log_error("cmirrord is required, but not running now.");
|
||||
+ return_0;
|
||||
+ }
|
||||
#ifdef MODPROBE_CMD
|
||||
if (use_modprobe) {
|
||||
if (target_version(target_name, maj, min, patchlevel))
|
@ -1,49 +0,0 @@
|
||||
From b8354ac161b5ab8a4f5842201d7ee69f5089c6dc Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 12 Jun 2014 17:07:31 +0200
|
||||
Subject: [PATCH] udev: Check for DM_NR_VALID_PATHS
|
||||
|
||||
When the device becomes inaccessible we must not run any program
|
||||
requiring disk access, as this will stall and cause udev to
|
||||
eventually timeout this event.
|
||||
|
||||
So check for DM_NR_VALID_PATHS before calling these programs.
|
||||
|
||||
References: bnc#875233
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
udev/10-dm.rules.in | 1 -
|
||||
udev/13-dm-disk.rules.in | 2 ++
|
||||
udev/69-dm-lvm-metad.rules.in | 1 +
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: LVM2.2.02.152/udev/13-dm-disk.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/udev/13-dm-disk.rules.in
|
||||
+++ LVM2.2.02.152/udev/13-dm-disk.rules.in
|
||||
@@ -18,10 +18,12 @@ SYMLINK+="disk/by-id/dm-name-$env{DM_NAM
|
||||
ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
|
||||
|
||||
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
|
||||
+ENV{DM_NR_VALID_PATHS}=="0", GOTO="dm_blkid_end"
|
||||
ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
|
||||
ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end"
|
||||
|
||||
(BLKID_RULE)
|
||||
+LABEL="dm_blkid_end"
|
||||
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
|
||||
OPTIONS+="watch"
|
||||
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
|
||||
Index: LVM2.2.02.152/udev/69-dm-lvm-metad.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/udev/69-dm-lvm-metad.rules.in
|
||||
+++ LVM2.2.02.152/udev/69-dm-lvm-metad.rules.in
|
||||
@@ -47,6 +47,7 @@ ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="dis
|
||||
|
||||
# DM device:
|
||||
KERNEL!="dm-[0-9]*", GOTO="next"
|
||||
+KERNEL=="dm-[0-9]*", ENV{DM_NR_VALID_PATHS}=="0", GOTO="lvm_end"
|
||||
ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", ENV{DM_ACTIVATION}=="1", GOTO="lvm_scan"
|
||||
GOTO="lvm_end"
|
||||
|
@ -1,54 +0,0 @@
|
||||
From a2fb79f7316871fb834b1181633292b3ac8dc46c Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 19 Aug 2016 16:13:48 +0200
|
||||
Subject: [PATCH] update lvm udev rules
|
||||
|
||||
References: bnc#78902 bnc#789019 bnc#789020
|
||||
---
|
||||
udev/10-dm.rules.in | 4 ++++
|
||||
udev/13-dm-disk.rules.in | 9 ++++++---
|
||||
2 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
|
||||
index 46a6869..7da0cc4 100644
|
||||
--- a/udev/10-dm.rules.in
|
||||
+++ b/udev/10-dm.rules.in
|
||||
@@ -101,6 +101,10 @@ TEST=="dm", ENV{DM_NAME}="$attr{dm/name}", ENV{DM_UUID}="$attr{dm/uuid}", ENV{DM
|
||||
TEST!="dm", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o name,uuid,suspended"
|
||||
ENV{DM_SUSPENDED}!="?*", IMPORT{program}="(DM_EXEC)/dmsetup info -j %M -m %m -c --nameprefixes --noheadings --rows -o suspended"
|
||||
|
||||
+# dmsetup export is a SUSE extension to dmsetup
|
||||
+# it is required by some other udev rules in SUSE distro.
|
||||
+IMPORT{program}="(DM_EXEC)/dmsetup export -j %M -m %m"
|
||||
+
|
||||
# dmsetup tool provides suspended state information in textual
|
||||
# form with values "Suspended"/"Active". We translate it to
|
||||
# 0/1 respectively to be consistent with sysfs values.
|
||||
diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in
|
||||
index 4b64dd6..dca9c5c 100644
|
||||
--- a/udev/13-dm-disk.rules.in
|
||||
+++ b/udev/13-dm-disk.rules.in
|
||||
@@ -14,14 +14,17 @@ ACTION!="add|change", GOTO="dm_end"
|
||||
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
|
||||
ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end"
|
||||
|
||||
-SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}"
|
||||
-ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}"
|
||||
+SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}", OPTIONS+="string_escape=replace"
|
||||
+ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
|
||||
|
||||
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
|
||||
ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
|
||||
+ENV{DM_TARGET_TYPES}=="|*error*", GOTO="dm_end"
|
||||
|
||||
(BLKID_RULE)
|
||||
-ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
|
||||
+ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
|
||||
+OPTIONS+="watch"
|
||||
+ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
@ -1,22 +0,0 @@
|
||||
From: Jeff Mahoney <jeffm@suse.com>
|
||||
Subject: build: Install links in libdir with versions
|
||||
|
||||
Plugins in $(libdir)/device-mapper should probably be versioned but
|
||||
when they're linked into $(libdir) directly, they must be versioned.
|
||||
|
||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
||||
---
|
||||
make.tmpl.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/make.tmpl.in
|
||||
+++ b/make.tmpl.in
|
||||
@@ -394,7 +394,7 @@ install_lib_shared: $(LIB_SHARED)
|
||||
# when the code is fixed links could be removed.
|
||||
install_dm_plugin: $(LIB_SHARED)
|
||||
$(INSTALL_PROGRAM) -D $< $(libdir)/device-mapper/$(<F)
|
||||
- $(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F)
|
||||
+ $(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F).$(LIB_VERSION)
|
||||
|
||||
install_lvm2_plugin: $(LIB_SHARED)
|
||||
$(INSTALL_PROGRAM) -D $< $(libdir)/lvm2/$(<F)
|
Loading…
Reference in New Issue
Block a user