storage device probing

Andrey Borzenkov arvidjaar at mail.ru
Tue Sep 13 10:02:08 PDT 2005


On Tuesday 13 September 2005 20:44, Kay Sievers wrote:
> HAL probes a main block device for a filesystem. Normally that fails and
> the partitions get recognized after that and everything is fine.
>
> The crazy ext filesystem has a amazing signature length of 16 bit (yes,
> two bytes!) to signify a ext filesystem. If by accident that happens to be
> on the disk, the main block device is offered by HAL for mounting. At the
> same time the partitons get probed and announced and everything messes up.
>

It is not limited to ext2, see <http://qa.mandriva.com/show_bug.cgi?id=15224>. 
When I tried to report it here I was told to fix partition table. Oh well :)

> We should at least invalidate _any_ result for a main block device if we
> get a partition event for the same device. Or we let HAL probe for a
> partitiontable first, but that is also slippery.
>

Why? It is exactly what kernel does in the absence of HAL; so it just makes 
HAL consistent with kernel.

> I don't see a nice solution, only invalidating a main volume result with
> the first partition event, or wait a while if partiton events travel in
> before we announce a possible main device filesystem.
> Any ideas?
>


My last patch for this bug report probes for partition table before probing 
for file system. It fixed the original problem and so far nobody 
complained :) It obviously needs redo for 0.5.x and  non-x86, but I believe 
this is the least evil approach,

regards

-andrey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050913/5fac42a1/attachment.pgp


More information about the hal mailing list