From: bmarzins@sourceware.org
To: dm-cvs@sourceware.org, dm-devel@redhat.com
Subject: multipath-tools/multipath kpartx_get_name mpat ...
Date: 25 May 2010 22:51:48 -0000 [thread overview]
Message-ID: <20100525225148.27224.qmail@sourceware.org> (raw)
CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL4_FC5
Changes by: bmarzins@sourceware.org 2010-05-25 22:51:43
Modified files:
multipath : kpartx_get_name mpath_get_name multipath.dev
Log message:
Mark Goodwin's patch to avoid running dm ls --exec <program>, to avoid the
race between multipath and dmsetup creating the device nodes.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/kpartx_get_name.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/mpath_get_name.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipath/multipath.dev.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.13.2.1&r2=1.13.2.2
--- multipath-tools/multipath/Attic/kpartx_get_name 2006/05/12 22:17:13 1.1
+++ multipath-tools/multipath/Attic/kpartx_get_name 2010/05/25 22:51:42 1.1.2.1
@@ -25,7 +25,8 @@
exit 1
fi
-i=`/sbin/dmsetup ls --target linear --exec basename -j $1 -m $2 2> /dev/null`
+dev=`/sbin/dmsetup ls --target linear -j $1 -m $2 | sed -e 's/([ 0-9]*,[ 0-9]*)//g' 2>/dev/null`
+i=`basename $dev 2>/dev/null`
if [ -n "$i" ] ; then
echo $i
--- multipath-tools/multipath/Attic/mpath_get_name 2006/05/12 22:17:13 1.1
+++ multipath-tools/multipath/Attic/mpath_get_name 2010/05/25 22:51:42 1.1.2.1
@@ -19,7 +19,8 @@
exit 1
fi
-i=`/sbin/dmsetup ls --target multipath --exec basename -j $1 -m $2 2> /dev/null`
+dev=`/sbin/dmsetup ls --target multipath -j $1 -m $2 | sed -e 's/([ 0-9]*,[ 0-9]*)//g' 2>/dev/null`
+i=`basename $dev 2>/dev/null`
if [ -n "$i" ] ; then
echo $i
--- multipath-tools/multipath/Attic/multipath.dev 2006/06/28 19:29:10 1.13.2.1
+++ multipath-tools/multipath/Attic/multipath.dev 2010/05/25 22:51:42 1.13.2.2
@@ -29,5 +29,8 @@
if [ "${DEVPATH:7:3}" = "dm-" -a "${ACTION}" = "add" ]; then
majmin=`awk -F ':' '{ print "-j",$1,"-m",$2 }' /sys/${DEVPATH}/dev`
- /sbin/dmsetup ls ${majmin} --target multipath --exec "/sbin/kpartx -a"
+ devnames=`/sbin/dmsetup ls ${majmin} --target multipath | sed -e 's/([ 0-9]*,[ 0-9]*)//g'`
+ for dev in $devnames; do
+ [ -n "$dev" ] && /sbin/kpartx -a /dev/mapper/$dev
+ done
fi
reply other threads:[~2010-05-25 22:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100525225148.27224.qmail@sourceware.org \
--to=bmarzins@sourceware.org \
--cc=dm-cvs@sourceware.org \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.