From: Neil Brown <neilb@suse.de>
To: torvalds@linux-foundation.org
Cc: akpm@suse.de, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org, David Greaves <david@dgreaves.com>,
Doug Ledford <dledford@redhat.com>
Subject: Please revert 5b479c91da90eef605f851508744bfe8269591a0 (md partition rescan)
Date: Thu, 10 May 2007 10:37:06 +1000 [thread overview]
Message-ID: <17986.26930.952993.510918@notabene.brown> (raw)
Hi Linus,
Could you please revert
5b479c91da90eef605f851508744bfe8269591a0
It causes an oops when auto-detecting raid arrays, and it doesn't seem
easy to fix.
The array may not be 'open' when do_md_run is called, so bdev->bd_disk
might be NULL, so bd_set_size can oops.
I cannot really open the array (blkdev_get) at this point as I
deadlock on mddev->reconfig_mutex.
I could simply guard against bdev->bd_disk being NULL, but that is too
ugly as sometimes the partitions would be found, and sometimes not.
This whole approach of opening an md device before it has been
assembled just seems to get more and more painful. I think I'm going
to have to come up with something clever to provide both backward
comparability with usage expectation, and sane integration into the
rest of the kernel.
Maybe if you open before the array is assembled you get a completely
different bdev somehow, and on array assembly, a new bdev, or gendisk
or something, gets swapped in so the next open finds it....
Anyway, if that patch can go I'd appreciate it.
Thanks,
NeilBrown
next reply other threads:[~2007-05-10 0:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 0:37 Neil Brown [this message]
2007-05-10 1:51 ` Please revert 5b479c91da90eef605f851508744bfe8269591a0 (md partition rescan) Linus Torvalds
2007-05-10 14:51 ` Jan Engelhardt
2007-05-10 14:59 ` Xavier Bestel
2007-05-10 16:48 ` Satyam Sharma
2007-05-11 0:36 ` H. Peter Anvin
2007-05-10 19:04 ` Andrew Morton
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=17986.26930.952993.510918@notabene.brown \
--to=neilb@suse.de \
--cc=akpm@suse.de \
--cc=david@dgreaves.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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;
as well as URLs for NNTP newsgroup(s).