]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add md sysfs patch which got lost in the suffle.
authorChris Wright <chrisw@sous-sol.org>
Thu, 9 Feb 2006 00:10:11 +0000 (16:10 -0800)
committerChris Wright <chrisw@sous-sol.org>
Thu, 9 Feb 2006 00:10:11 +0000 (16:10 -0800)
review/md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch [new file with mode: 0644]
review/series

diff --git a/review/md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch b/review/md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch
new file mode 100644 (file)
index 0000000..605eb71
--- /dev/null
@@ -0,0 +1,41 @@
+From nobody Mon Sep 17 00:00:00 2001
+Subject: [PATCH] md: remove slashes from disk names when creation dev names in sysfs
+From: Neil Brown <neilb@suse.de>
+Date: 1137056723 -0800
+
+e.g. The sx8 driver uses names like sx8/0.
+
+This would make a md component dev name like
+
+   /sys/block/md0/md/dev-sx8/0
+
+which is not allowed.  So we change the '/' to '!' just like
+fs/partitions/check.c(register_disk) does.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Linus Torvalds <torvalds@osdl.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ drivers/md/md.c |    3 +++
+ 1 files changed, 3 insertions(+)
+
+--- linux-2.6.15.3.orig/drivers/md/md.c
++++ linux-2.6.15.3/drivers/md/md.c
+@@ -1182,6 +1182,7 @@ static int bind_rdev_to_array(mdk_rdev_t
+       mdk_rdev_t *same_pdev;
+       char b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE];
+       struct kobject *ko;
++      char *s;
+       if (rdev->mddev) {
+               MD_BUG();
+@@ -1213,6 +1214,8 @@ static int bind_rdev_to_array(mdk_rdev_t
+       bdevname(rdev->bdev,b);
+       if (kobject_set_name(&rdev->kobj, "dev-%s", b) < 0)
+               return -ENOMEM;
++      while ( (s=strchr(rdev->kobj.k_name, '/')) != NULL)
++              *s = '!';
+                       
+       list_add(&rdev->same_set, &mddev->disks);
+       rdev->mddev = mddev;
index aecb661b5dd739c56ce79535ee3953a342d4fba4..9781b1a0f13f6d06cea0b80f742efb6860172998 100644 (file)
@@ -21,3 +21,4 @@ bridge-fix-rcu-race-on-device-removal.patch
 emu10k1-fix-the-confliction-of-front-control.patch
 x86_64-dont-record-local-apic-ids-when-they-are-disabled-in-madt.patch
 __cmpxchg-must-really-always-be-inlined.patch
+md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch