Merge lp:~serge-hallyn/ubuntu/natty/multipath-tools/fix-uevent2 into lp:ubuntu/natty/multipath-tools

Proposed by Serge Hallyn
Status: Needs review
Proposed branch: lp:~serge-hallyn/ubuntu/natty/multipath-tools/fix-uevent2
Merge into: lp:ubuntu/natty/multipath-tools
Diff against target: 67 lines (+47/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/1002--Fix-for-uevent-devpath-handling.patch (+39/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~serge-hallyn/ubuntu/natty/multipath-tools/fix-uevent2
Reviewer Review Type Date Requested Status
Colin Watson Pending
Review via email: mp+43008@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

35. By Serge Hallyn

Add patch to fix uevent devpath handling. This is needed at least
from lucid..natty to work with the Intel Modular Server.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-03-08 14:50:04 +0000
3+++ debian/changelog 2010-12-07 20:41:48 +0000
4@@ -1,3 +1,10 @@
5+multipath-tools (0.4.8-14ubuntu5) natty; urgency=low
6+
7+ * Add patch to fix uevent devpath handling. This is needed at least
8+ from lucid..natty to work with the Intel Modular Server.
9+
10+ -- Serge Hallyn <serge.hallyn@ubuntu.com> Tue, 07 Dec 2010 14:10:13 -0600
11+
12 multipath-tools (0.4.8-14ubuntu4) lucid; urgency=low
13
14 * debian/control: Move libreadline5-dev build dependency to libreadline-dev.
15
16=== added file 'debian/patches/1002--Fix-for-uevent-devpath-handling.patch'
17--- debian/patches/1002--Fix-for-uevent-devpath-handling.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/1002--Fix-for-uevent-devpath-handling.patch 2010-12-07 20:41:48 +0000
19@@ -0,0 +1,39 @@
20+Ubuntu: https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/520309
21+Upstream: http://www.linux-archive.org/device-mapper-development/210372-fix-uevent-devpath-handling.html
22+Description: Fix for uevent devpath handling
23+ This is necessary to make uevents work on fedora, since devpath appears as
24+ something like:
25+ '/devices/pci0000:00/0000:00:0a.0/0000:06:00.0/host11/rport-11:0-1/target11:0:1/11:0:1:0/block/sdi'
26+ It simply strips off the everything up to the /block.
27+ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
28+ (Additionally squashed in two other trivial upstream fixes,
29+ 15d4bdddcb9b71e0ec6fecc3c37a1b8cae8f51ff and
30+ 27bdfc160a3ca96ade90b17291f25677fe2aaadf)
31+
32+Index: multipath-tools-fix/multipathd/main.c
33+===================================================================
34+--- multipath-tools-fix.orig/multipathd/main.c 2010-12-07 14:09:21.361201001 -0600
35++++ multipath-tools-fix/multipathd/main.c 2010-12-07 14:09:51.011201001 -0600
36+@@ -615,13 +615,19 @@
37+ static int
38+ uev_discard(char * devpath)
39+ {
40+- char a[10], b[10];
41++ char *tmp;
42++ char a[11], b[11];
43+
44+ /*
45+ * keep only block devices, discard partitions
46+ */
47+- if (sscanf(devpath, "/block/%10s", a) != 1 ||
48+- sscanf(devpath, "/block/%10[^/]/%10s", a, b) == 2) {
49++ tmp = strstr(devpath, "/block/");
50++ if (tmp == NULL){
51++ condlog(4, "no /block/ in '%s'", devpath);
52++ return 1;
53++ }
54++ if (sscanf(tmp, "/block/%10s", a) != 1 ||
55++ sscanf(tmp, "/block/%10[^/]/%10s", a, b) == 2) {
56+ condlog(4, "discard event on %s", devpath);
57+ return 1;
58+ }
59
60=== modified file 'debian/patches/series'
61--- debian/patches/series 2010-02-12 11:52:22 +0000
62+++ debian/patches/series 2010-12-07 20:41:48 +0000
63@@ -12,3 +12,4 @@
64 0012--libmultipath-Update-discovery-to-work-with-new-sys.patch
65 1000--set-umask-in-multipathd.patch
66 1001--intel-mpath-prio-alua.patch
67+1002--Fix-for-uevent-devpath-handling.patch

Subscribers

People subscribed via source and target branches

to all changes: