From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Cc: Suresh Grandhi <Sureshg@ami.com>,
"'linux-ide@vger.kernel.org'" <linux-ide@vger.kernel.org>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: IDE Hotswap
Date: Wed, 29 Sep 2004 02:50:34 +0100 [thread overview]
Message-ID: <1096422632.14637.30.camel@localhost.localdomain> (raw)
In-Reply-To: <200409290354.38440.bzolnier@elka.pw.edu.pl>
On Mer, 2004-09-29 at 02:54, Bartlomiej Zolnierkiewicz wrote:
> Your patch is a nice start but it don't solve main issues, not to even
> mention minor stuff like leaving /proc/ide/<chipset> around.
> Merging it now is asking for problems.
Oh I agree. There is a patch but it isn't the final answer. There is a
small resource bug (harmless but a bug) in the 2.6.8.1-ac patch. I
hadn't noticed proc/ide/<chipset> leaking but I'll take a look when I
get time to sort that out.
> > For drive level hotplug its actually a lot easier and I guess that is
> > the case most users care about. The changes done for 2.6 clean up stuff
>
> drive level hotplug is actually much harder
> and it is _required_ for controller level hotplug, no? :)
Actually its all a lot easier now than in 2.4 because the block layer is
designed to make it possible.
> > like suspend mean the nasties in 2.4 for sequencing have gone away. No
> > refcounting needed since the block and fs layer are doing it all for
>
> It helps but you still get bunch of races. Refcounting is _really_ needed.
Even in 2.4 ide drive hotplug was easy. The drive hotplug comes out
trivially because your controllers are fairly constant. As we all know
driver level hotplug is a bit trickier although the block layer has
really made this vastly easier in 2.6
For drive level hotplug you don't actually need refcounting at all
providing you've got a couple of locking issues dealt with.
Firstly the drive never goes away as a high level object (in fact you
don't want it to as then you can't ioctl it to make it come back!). That
means the upper layers don't know anything about it.
At the IDE layer the 2.4 code simply enforced the rule that you must be
the only opener of the device in order to hot unplug it. That means we
know its quiescent and not mounted. The only 2.4 race I know about is
suspend in parallel to hot unplug, and 2.6 has the mechanism to fix that
properly because suspend is a command state machine.
Providing hot unplug is about making drive->present stuff vary and
flipping to ide_default drivers the world is happy. The moment you want
to make /dev/hda 'disappear' to the block layer its fun, and on 2.4 its
as good as impossible.
Alan
next prev parent reply other threads:[~2004-09-29 2:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8CCBDD5583C50E4196F012E79439B45C069657DB@atl-ms1.megatrends.com>
2004-09-28 21:38 ` IDE Hotswap Bartlomiej Zolnierkiewicz
2004-09-28 21:45 ` Alan Cox
2004-09-29 1:54 ` Bartlomiej Zolnierkiewicz
2004-09-29 1:50 ` Alan Cox [this message]
2004-09-29 12:08 ` Bartlomiej Zolnierkiewicz
2004-09-29 14:35 ` Alan Cox
2004-09-29 18:20 ` Bartlomiej Zolnierkiewicz
2004-09-29 17:46 ` Alan Cox
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=1096422632.14637.30.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=Sureshg@ami.com \
--cc=bzolnier@elka.pw.edu.pl \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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