SHA256
1
0
forked from pool/lvm2

Accepting request 508664 from network:ha-clustering:Unstable

- Don't create symlink for invisible device like thin-pool (bsc#1046591)
  * drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch

- Don't create symlink for invisible device like thin-pool (bsc#1046591)
  * drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch

- Don't create symlink for invisible device like thin-pool (bsc#1046591)
  * drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch

OBS-URL: https://build.opensuse.org/request/show/508664
OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=196
This commit is contained in:
Eric ren 2017-07-07 05:24:39 +00:00 committed by Git OBS Bridge
parent 82463e3962
commit 673bbc3719
9 changed files with 63 additions and 98 deletions

View File

@ -1,33 +0,0 @@
From de73c1ab474661307d87b3bcfe442fd9f3e31233 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 19 Aug 2016 16:16:13 +0200
Subject: [PATCH] 10-dm.rules: Reset state variables for spurious events
When spurious events are generated we need to ensure to always
present the same information than the original event; otherwise
systemd might be thinking the device to be non-functional and
will take unwanted action (like unmounting it).
References: bsc#932300
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
udev/10-dm.rules.in | 5 +++++
1 file changed, 5 insertions(+)
Index: LVM2.2.02.165/udev/10-dm.rules.in
===================================================================
--- LVM2.2.02.165.orig/udev/10-dm.rules.in
+++ LVM2.2.02.165/udev/10-dm.rules.in
@@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2"
ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}"
+# Reset variables for spurious events
+ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=""
+ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=""
+ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=""
+
# Avoid processing and scanning a DM device in the other (foreign)
# rules if it is in suspended state. However, we still keep 'disk'
# and 'DM subsystem' related rules enabled in this case.

View File

@ -1,4 +1,4 @@
From b148cb1c1e801455cb774f51eecd57f7e4f98c39 Mon Sep 17 00:00:00 2001 From 74cfa0a04f51f0629093ac11fafb9c8aba881eee Mon Sep 17 00:00:00 2001
From: Eric Ren <zren@suse.com> From: Eric Ren <zren@suse.com>
Date: Tue, 11 Apr 2017 10:58:56 +0800 Date: Tue, 11 Apr 2017 10:58:56 +0800
Subject: [PATCH] DM: add dmsetup export Subject: [PATCH] DM: add dmsetup export
@ -7,15 +7,15 @@ bsc#479104
Patch-refreshed-by: Eric Ren <zren@suse.com> Patch-refreshed-by: Eric Ren <zren@suse.com>
--- ---
man/dmsetup.8_main | 16 +++- man/dmsetup.8_main | 16 ++++++-
tools/dmsetup.c | 252 ++++++++++++++++++++++++++++++++++++++++++++++++++++- tools/dmsetup.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 266 insertions(+), 2 deletions(-) 2 files changed, 139 insertions(+), 1 deletion(-)
Index: LVM2.2.02.169/man/dmsetup.8_main diff --git a/man/dmsetup.8_main b/man/dmsetup.8_main
=================================================================== index 4421882..5a31f76 100644
--- LVM2.2.02.169.orig/man/dmsetup.8_main --- a/man/dmsetup.8_main
+++ LVM2.2.02.169/man/dmsetup.8_main +++ b/man/dmsetup.8_main
@@ -97,7 +97,15 @@ dmsetup \(em low level logical volume ma @@ -97,7 +97,15 @@ dmsetup \(em low level logical volume management
.. ..
.CMD_LOAD .CMD_LOAD
. .
@ -32,7 +32,7 @@ Index: LVM2.2.02.169/man/dmsetup.8_main
.B dmsetup .B dmsetup
.de CMD_LS .de CMD_LS
. ad l . ad l
@@ -564,6 +572,12 @@ Specify a one-line table directly on the @@ -564,6 +572,12 @@ Specify a one-line table directly on the command line.
See below for more information on the table format. See below for more information on the table format.
. .
.HP .HP
@ -45,11 +45,11 @@ Index: LVM2.2.02.169/man/dmsetup.8_main
.BR --udevcookie .BR --udevcookie
.IR cookie .IR cookie
.br .br
Index: LVM2.2.02.169/tools/dmsetup.c diff --git a/tools/dmsetup.c b/tools/dmsetup.c
=================================================================== index 5c5c14c..2b0aed6 100644
--- LVM2.2.02.169.orig/tools/dmsetup.c --- a/tools/dmsetup.c
+++ LVM2.2.02.169/tools/dmsetup.c +++ b/tools/dmsetup.c
@@ -2231,6 +2231,129 @@ out: @@ -2231,6 +2231,129 @@ static int _status(CMD_ARGS)
return r; return r;
} }
@ -179,16 +179,14 @@ Index: LVM2.2.02.169/tools/dmsetup.c
/* Show target names and their version numbers */ /* Show target names and their version numbers */
static int _targets(CMD_ARGS) static int _targets(CMD_ARGS)
{ {
@@ -5904,7 +6027,11 @@ static struct command _dmsetup_commands[ @@ -5903,6 +6026,7 @@ static struct command _dmsetup_commands[] = {
{"deps", "[-o <options>] [<device>...]", 0, -1, 1, 0, _deps}, {"deps", "[-o <options>] [<device>...]", 0, -1, 1, 0, _deps},
{"stats", "<command> [<options>] [<device>...]", 1, -1, 1, 1, _stats}, {"stats", "<command> [<options>] [<device>...]", 1, -1, 1, 1, _stats},
{"status", "[<device>...] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status}, {"status", "[<device>...] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status},
- {"table", "[<device>...] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status},
+ {"deps", "[-o <options>] [<device>]", 0, -1, 1, 0, _deps},
+ {"stats", "<command> [<options>] [<devices>]", 1, -1, 1, 1, _stats},
+ {"status", "[<device>] [--noflush] [--target <target_type>]", 0, -1, 1, 0, _status},
+ {"export", "[<device>]", 0, -1, 1, 0, _export}, + {"export", "[<device>]", 0, -1, 1, 0, _export},
+ {"table", "[<device>] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status}, {"table", "[<device>...] [--target <target_type>] [--showkeys]", 0, -1, 1, 0, _status},
{"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, 0, _wait}, {"wait", "<device> [<event_nr>] [--noflush]", 0, 2, 0, 0, _wait},
{"mknodes", "[<device>...]", 0, -1, 1, 0, _mknodes}, {"mknodes", "[<device>...]", 0, -1, 1, 0, _mknodes},
{"mangle", "[<device>...]", 0, -1, 1, 0, _mangle}, --
2.10.2

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 6 10:18:09 UTC 2017 - zren@suse.com
- Don't create symlink for invisible device like thin-pool (bsc#1046591)
* drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com

View File

@ -89,16 +89,14 @@ Patch2002: udev_rules-update.diff
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
#bnc909358 #bnc909358
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2005: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298 #bsc#940298
Patch2006: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
#bnc#990538,bnc#986734 #bnc#990538,bnc#986734
Patch2007: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#bsc#1012973 #bsc#1012973
Patch2008: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
# no reference # no reference
Patch2009: device-mapper-gcc-warnings.patch Patch2008: device-mapper-gcc-warnings.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
%description %description
@ -131,7 +129,6 @@ Programs and man pages for configuring and using the device mapper.
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%build %build

View File

@ -1,6 +1,6 @@
From 02cb88827f05e4a18664d85b6d40bf33c22a3453 Mon Sep 17 00:00:00 2001 From cdb0d133b17a8c590f4b7458dbea81cdd4b4ed26 Mon Sep 17 00:00:00 2001
From: Eric Ren <zren@suse.com> From: Eric Ren <zren@suse.com>
Date: Tue, 4 Jul 2017 20:00:34 +0800 Date: Thu, 6 Jul 2017 17:42:58 +0800
Subject: [Patch v2] fsadm: add support for btrfs Subject: [Patch v2] fsadm: add support for btrfs
Check: mount the device first and then run`btrfs filesystem scrub start Check: mount the device first and then run`btrfs filesystem scrub start
@ -22,11 +22,11 @@ Hi David,
Signed-off-by: Lidong Zhong <lzhong@suse.com> Signed-off-by: Lidong Zhong <lzhong@suse.com>
Refreshed-by: Eric Ren <zren@suse.com> Refreshed-by: Eric Ren <zren@suse.com>
--- ---
scripts/fsadm.sh | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- scripts/fsadm.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 81 insertions(+), 4 deletions(-) 1 file changed, 72 insertions(+), 4 deletions(-)
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index adf9b55..28a7854 100755 index adf9b55..00ccc73 100755
--- a/scripts/fsadm.sh --- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh +++ b/scripts/fsadm.sh
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
@ -45,20 +45,17 @@ index adf9b55..28a7854 100755
# user may override lvm location by setting LVM_BINARY # user may override lvm location by setting LVM_BINARY
LVM=${LVM_BINARY:-lvm} LVM=${LVM_BINARY:-lvm}
@@ -75,6 +77,12 @@ BLOCKCOUNT= @@ -75,6 +77,9 @@ BLOCKCOUNT=
MOUNTPOINT= MOUNTPOINT=
MOUNTED= MOUNTED=
REMOUNT= REMOUNT=
+FINDMNT= +FINDMNT=
+UUID= +UUID=
+BTRFS_DEVID= +BTRFS_DEVID=
+PROCMOUNTS="/proc/mounts"
+PROCSELFMOUNTINFO="/proc/self/mountinfo"
+NULL="$DM_DEV_DIR/null"
PROCDIR="/proc" PROCDIR="/proc"
PROCMOUNTS="$PROCDIR/mounts" PROCMOUNTS="$PROCDIR/mounts"
PROCSELFMOUNTINFO="$PROCDIR/self/mountinfo" PROCSELFMOUNTINFO="$PROCDIR/self/mountinfo"
@@ -152,7 +160,7 @@ cleanup() { @@ -152,7 +157,7 @@ cleanup() {
export _FSADM_YES _FSADM_EXTOFF export _FSADM_YES _FSADM_EXTOFF
unset FSADM_RUNNING unset FSADM_RUNNING
test -n "$LVM_BINARY" && PATH=$_SAVEPATH test -n "$LVM_BINARY" && PATH=$_SAVEPATH
@ -67,7 +64,7 @@ index adf9b55..28a7854 100755
fi fi
# error exit status for break # error exit status for break
@@ -225,6 +233,36 @@ detect_fs() { @@ -225,6 +230,33 @@ detect_fs() {
verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"." verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"."
} }
@ -98,13 +95,10 @@ index adf9b55..28a7854 100755
+ +
+ IFS=$STR_IFS + IFS=$STR_IFS
+} +}
+
+detect_mounted_with_proc_self_mountinfo() {
+ MOUNTED=$("$GREP" "^[0-9]* [0-9]* $MAJORMINOR " "$PROCSELFMOUNTINFO")
# Check that passed mounted MAJOR:MINOR is not matching $MAJOR:MINOR of resized $VOLUME # Check that passed mounted MAJOR:MINOR is not matching $MAJOR:MINOR of resized $VOLUME
validate_mounted_major_minor() { validate_mounted_major_minor() {
@@ -348,8 +386,12 @@ detect_mounted_with_proc_mounts() { @@ -348,8 +380,12 @@ detect_mounted_with_proc_mounts() {
# check if the given device is already mounted and where # check if the given device is already mounted and where
# FIXME: resolve swap usage and device stacking # FIXME: resolve swap usage and device stacking
@ -119,7 +113,7 @@ index adf9b55..28a7854 100755
detect_mounted_with_proc_self_mountinfo detect_mounted_with_proc_self_mountinfo
elif test -e "$PROCMOUNTS"; then elif test -e "$PROCMOUNTS"; then
detect_mounted_with_proc_mounts detect_mounted_with_proc_mounts
@@ -514,6 +556,31 @@ resize_xfs() { @@ -514,6 +550,31 @@ resize_xfs() {
fi fi
} }
@ -151,18 +145,15 @@ index adf9b55..28a7854 100755
#################### ####################
# Resize filesystem # Resize filesystem
#################### ####################
@@ -530,6 +597,10 @@ resize() { @@ -530,6 +591,7 @@ resize() {
"ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;; "ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;;
"reiserfs") resize_reiser $NEWSIZE ;; "reiserfs") resize_reiser $NEWSIZE ;;
"xfs") resize_xfs $NEWSIZE ;; "xfs") resize_xfs $NEWSIZE ;;
+ "btrfs") resize_btrfs $NEWSIZE ;; + "btrfs") resize_btrfs $NEWSIZE ;;
+ *) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool" ;;
+ esac || error "Resize $FSTYPE failed"
+ cleanup 0
*) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;; *) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;;
esac || error "Resize $FSTYPE failed." esac || error "Resize $FSTYPE failed."
cleanup 0 cleanup 0
@@ -587,6 +658,12 @@ check() { @@ -587,6 +649,12 @@ check() {
# Think about better way.... # Think about better way....
dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME" dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME"
fi ;; fi ;;
@ -175,7 +166,7 @@ index adf9b55..28a7854 100755
*) # check if executed from interactive shell environment *) # check if executed from interactive shell environment
case "$-" in case "$-" in
*i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;; *i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;;
@@ -608,7 +685,7 @@ test -n "$FSADM_RUNNING" && exit 0 @@ -608,7 +676,7 @@ test -n "$FSADM_RUNNING" && exit 0
for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \ for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
"$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \ "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
"$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \ "$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 6 10:18:09 UTC 2017 - zren@suse.com
- Don't create symlink for invisible device like thin-pool (bsc#1046591)
* drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com

View File

@ -92,16 +92,14 @@ Patch2002: udev_rules-update.diff
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
#bnc909358 #bnc909358
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2005: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298 #bsc#940298
Patch2006: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
#bnc#990538,bnc#986734 #bnc#990538,bnc#986734
Patch2007: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#bsc#1012973 #bsc#1012973
Patch2008: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
# no reference # no reference
Patch2009: device-mapper-gcc-warnings.patch Patch2008: device-mapper-gcc-warnings.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
%description %description
@ -135,7 +133,6 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%build %build

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jul 6 10:18:09 UTC 2017 - zren@suse.com
- Don't create symlink for invisible device like thin-pool (bsc#1046591)
* drop 10-dm.rules-Reset-state-variable-for-spurious-events.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com Tue Jul 4 10:24:40 UTC 2017 - zren@suse.com

View File

@ -100,16 +100,14 @@ Patch2002: udev_rules-update.diff
Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2003: udev-Check-for-DM_NR_VALID_PATHS.patch
#bnc909358 #bnc909358
Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch Patch2004: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2005: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298 #bsc#940298
Patch2006: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2005: libdm-iface-not-output-error-message-inside-retry-loop.patch
#bnc#990538,bnc#986734 #bnc#990538,bnc#986734
Patch2007: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2006: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#bsc#1012973 #bsc#1012973
Patch2008: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2007: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
# no reference # no reference
Patch2009: device-mapper-gcc-warnings.patch Patch2008: device-mapper-gcc-warnings.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
# 3000+ for test code # 3000+ for test code
@ -152,7 +150,6 @@ Volume Manager.
%patch2006 -p1 %patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1
### COMMON-PREP-END ### ### COMMON-PREP-END ###
%patch3001 -p1 %patch3001 -p1