[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



On Wed, 2004-08-18 at 07:30, Mike Panetta wrote:
> I am messing around with some (brute force) hot swap, and I can get the swapping done
> and it re reads the ptable correctly if I force it to, but it will not re read the geometry
> which is causing some (maybe harmless) error messages saying its trying to access
> a non existant block when it rereads the partition table.  Does anyone know of a way
> to force linux to re read an IDE drives C,H,S (geometry)?  I have tried all the obvious
> hdparm commands...  I wish it would just do it when a bus reset occured, that would
> make things easy.  Anyone know why this is not done?

	The easy answer: because they didn't have to.

	Seriously, the IDE drivers have 10+ years of cruft in 'em.  When it was
first written, hot-swap obviously wasn't even considered possible (with
IDE).

	In a previous life I got to implement IDE hot swap for the 2.4 kernel. 
We had ACPI tell us when something happened (drive N just
(dis)appeared), and I wrote a routine to handle it via the
ide_register() and ide_unregister() functions.  Since ide_register()
assumes (bad function!) many things (like: the drive is in PIO mode), I
had to make sure that the assumptions were valid.  Specifically, upon
removal, I had to reset the chipset to PIO speed, and such.  Thus, when
ide_register() was called, it was just as if the machine was performing
"drive discovery" during boot, with all that it implies (re-reading the
geometry, partition table, etc.)

	Okay before this becomes a novel or even a short story...whoops!

	If you're masochistic enough to want still more info, feel free to
contact me off-list.

	By the way, the IDE driver is getting a major face-lift from Alan Cox
and Bart (something).  Apparently, Alan is appalled (with two Ps ;-) at
the locking therein, some of which is totally broken, racey, etc.

	There I go again.  Bye!

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00513" href="msg00513.html">[ale] ALE NW: Fine-Grain Directions</a></strong>
<ul><li><em>From:</em> hbbs at comcast.net (Jeff Hubbs)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00440" href="msg00440.html">[ale] Is it possible to force Linux to reread a drives gemoetry?</a></strong>
<ul><li><em>From:</em> ahuitzot at mindspring.com (Mike Panetta)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00511.html">[ale] Bellsouth DSL to Speedfactory or SnappyDSL?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00513.html">[ale] ALE NW: Fine-Grain Directions</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00440.html">[ale] Is it possible to force Linux to reread a drives gemoetry?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00513.html">[ale] ALE NW: Fine-Grain Directions</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00512"><strong>Date</strong></a></li>
<li><a href="threads.html#00512"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>