Accepting request 514845 from network:ha-clustering:Unstable

- 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

- Update to LVM2.2.02.173
- Sync our lvm.conf with V2.02.173

- 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

- Update to LVM2.2.02.173
- Sync our lvm.conf with V2.02.173

- 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

OBS-URL: https://build.opensuse.org/request/show/514845
OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=200
This commit is contained in:
Eric ren 2017-08-07 07:53:46 +00:00 committed by Git OBS Bridge
parent 9845151b03
commit 0ce44c981a
20 changed files with 1867 additions and 1385 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eab09d4132e6ade4db22249e554919045948efb908ffa40409e8e8e0c316f708
size 2351684

View File

@ -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
View 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
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAllw138ACgkQIoGRwVZ+LBcXbwCeI1gt2DZhVSuyEN784ynSzaHb
VoYAoOOY7HFlESPCTBoFKks4zY/9Ou5D
=Na9K
-----END PGP SIGNATURE-----

View File

@ -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

View File

@ -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);

View File

@ -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)
{

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
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
-------------------------------------------------------------------
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

View File

@ -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,32 +53,22 @@ 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
@ -89,14 +79,10 @@ Patch2002: udev_rules-update.diff
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
Patch2005: 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 +102,12 @@ 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

View File

@ -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);

View File

@ -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" \

View File

@ -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

2666
lvm.conf

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
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
-------------------------------------------------------------------
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

View File

@ -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,32 +56,22 @@ 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
@ -92,14 +82,10 @@ Patch2002: udev_rules-update.diff
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
Patch2005: 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 +106,12 @@ 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

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
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
-------------------------------------------------------------------
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

View File

@ -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,32 +64,22 @@ 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
@ -100,14 +90,10 @@ Patch2002: udev_rules-update.diff
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
Patch2005: 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 +123,12 @@ 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

View File

@ -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

View File

@ -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))

View File

@ -1,19 +1,21 @@
From a2fb79f7316871fb834b1181633292b3ac8dc46c Mon Sep 17 00:00:00 2001
From 68b91b24d8743129b971b047e1189d6f6e772b15 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 19 Aug 2016 16:13:48 +0200
Date: Tue, 25 Jul 2017 22:19:10 +0800
Subject: [PATCH] update lvm udev rules
References: bnc#78902 bnc#789019 bnc#789020
Refrshed-by: Eric Ren <zren@suse.com>
---
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
index b4fa52a..166dd3d 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
@@ -115,6 +115,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"
@ -25,7 +27,7 @@ index 46a6869..7da0cc4 100644
# 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
index 5355810..0e97e59 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"
@ -48,7 +50,7 @@ index 4b64dd6..dca9c5c 100644
+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}"
ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
--
2.6.6
2.10.2