public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sander <sander@humilis.net>
To: Neil Brown <neilb@suse.de>
Cc: sander@humilis.net, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: SOLVED: Re: Kernel BUG at fs/sysfs/symlink.c:87 happens with 2.6.15 too
Date: Thu, 12 Jan 2006 10:59:01 +0100	[thread overview]
Message-ID: <20060112095901.GA18956@favonius> (raw)
In-Reply-To: <17349.35975.929839.197710@cse.unsw.edu.au>

Neil Brown wrote (ao):
> sx8 creates device names with a '/' in them as we can see from:
> > 
> > [ 2281.547827] md: bind<sda1>
> > [ 2281.547877] md: bind<sx8/0p1>
>                              ^
> 
> That's unfortunate.  We will have to remove them.
> You will find that the names in /sys/block look like
>     /sys/block/sx8!0
> 
> The following patch should achieve the same substitution for
> md.

Thanks Neil!

2.6.15 with your patch works (lets me create raid on the Promise SX8
SATA controller).

I don't quite understand why I'm the first one to hit this (the Promise
SX8 is good value for money and with decent Linux support?), but it
seems your patch is needed in both vanilla and -mm.

Thanks again, Sander


> --------------------------
> 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 <neilb@suse.de>
> 
> ### 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 09:43:11.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;

-- 
Humilis IT Services and Solutions
http://www.humilis.net

      reply	other threads:[~2006-01-12  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 15:13 2.6.15-mm2: Kernel BUG at fs/sysfs/symlink.c:87 Sander
2006-01-11 19:20 ` Kernel BUG at fs/sysfs/symlink.c:87 happens with 2.6.15 too Sander
2006-01-11 22:53   ` Neil Brown
2006-01-12  9:59     ` Sander [this message]

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=20060112095901.GA18956@favonius \
    --to=sander@humilis.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox