Hello kernel people,
the attached oops happens when I try to create an md-array on an aoe device
in conjunction with vanilla Kernel 2.6.15+drbd+aoe:
--cut--
kernel BUG at fs/sysfs/symlink.c:87!
invalid operand: 0000 [#1]
SMP
Modules linked in: aoe
CPU: 0
EIP: 0060:[<c01762f7>] Not tainted VLI
EFLAGS: 00010246 (2.6.15-jupiter-frontend)
EIP is at sysfs_create_link+0x18/0x4e
eax: f1b9e8bc ebx: 00000000 ecx: c031954c edx: f7cac700
esi: f1b9e880 edi: f7d77000 ebp: f1b9e8bc esp: f153bdbc
ds: 007b es: 007b ss: 0068
Process mdadm (pid: 13983, threadinfo=f153a000 task=f6ddba30)
Stack: f153bdf0 c02ab6b2 f1b9e8bc f72cbe10 c031954c ffffffff f1b9e880
c020cbbc
f1b9e8d4 f1b9e880 c02abf08 f1b9e8bc f4f27690 65687465 652f6472
00302e31
c0155502 f4f27690 ee9e511e 459ecce4 00000010 00000010 f1b9e880
f7d77000
Call Trace:
[<c02ab6b2>] bind_rdev_to_array+0x13c/0x14b
[<c020cbbc>] kobject_init+0xe/0x3a
[<c02abf08>] md_import_device+0x83/0x16e
[<c0155502>] __link_path_walk+0xabe/0xbb5
[<c02ad6db>] add_new_disk+0x24e/0x2ff
[<c020e2aa>] radix_tree_gang_lookup_tag+0x42/0x5c
[<c0210356>] copy_from_user+0x3a/0x60
[<c02ae556>] md_ioctl+0x3df/0x4f6
[<c0138a89>] pagevec_lookup+0x1a/0x21
[<c0138e97>] invalidate_mapping_pages+0xa0/0xb5
[<c02075d2>] blkdev_driver_ioctl+0x40/0x58
[<c0207731>] blkdev_ioctl+0x147/0x154
[<c0150443>] block_ioctl+0x1a/0x1e
[<c0158488>] do_ioctl+0x28/0x66
[<c0158758>] vfs_ioctl+0x17e/0x18c
[<c0158791>] sys_ioctl+0x2b/0x46
[<c01027a1>] syscall_call+0x7/0xb
Code: 15 fc ff 5e 53 e8 69 15 fc ff 59 89 e8 5a 5b 5e 5f 5d c3 53 8b 44 24
08 8b 4c 24 10 85 c0 8b 58 30 74 08 85 db 74 04 85 c9 75 08 <0f> 0b 57 00 e8
34 32 c0 8b 53 0c f0 ff 4a 74 0f 88 c4 01 00 00
--cut--
Oops happens while the following ioctl is running:
ioctl(3, 0x40140921 <unfinished ...>
fd3 is /dev/md0
The command I have been using was:
mdadm -C --level=raid1 -n 2 --auto=md /dev/md0 /dev/etherd/e1.0 /dev/etherd/e2.0
Concerning the strace Output I would assume a bug in the md code rather
than aoe. Unfortunaltely I am unable to test this with generic IDE devices.
Regards
Sven
--
"Those who do not understand Unix are condemned to reinvent it, poorly"
(Henry Spencer)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
On Friday January 13, [email protected] wrote:
> Hello kernel people,
>
> the attached oops happens when I try to create an md-array on an aoe device
> in conjunction with vanilla Kernel 2.6.15+drbd+aoe:
>
> --cut--
> kernel BUG at fs/sysfs/symlink.c:87!
Thanks for the report.
This should be fixed by the following patch.
NeilBrown
----------------------
Remove slashed from disk names when creation dev names in sysfs
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 no allowed. So we change the '/' to '!' just like
fs/partitions/check.c(register_disk) does.
Signed-off-by: Neil Brown <[email protected]>
### Diffstat output
./drivers/md/md.c | 3 +++
1 file changed, 3 insertions(+)
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2006-01-12 11:18:52.000000000 +1100
+++ ./drivers/md/md.c 2006-01-12 09:44:39.000000000 +1100
@@ -1238,6 +1238,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();
@@ -1277,6 +1278,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;