From 2183b11217ff14a08e44901cd6f9dc1c80c258c5 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 8 Feb 2006 16:10:11 -0800 Subject: [PATCH] Add md sysfs patch which got lost in the suffle. --- ...mes-when-creation-dev-names-in-sysfs.patch | 41 +++++++++++++++++++ review/series | 1 + 2 files changed, 42 insertions(+) create mode 100644 review/md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch 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 index 00000000000..605eb71b833 --- /dev/null +++ b/review/md-remove-slashes-from-disk-names-when-creation-dev-names-in-sysfs.patch @@ -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 +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 +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + 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; diff --git a/review/series b/review/series index aecb661b5dd..9781b1a0f13 100644 --- a/review/series +++ b/review/series @@ -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 -- 2.47.3