[PATCH] remove usage of g_assert() in blockdev

Doug Goldstein cardoe at gentoo.org
Fri Nov 17 17:46:18 PST 2006


Mark Rosenstand wrote:
> On Tue, 2006-11-14 at 22:44 +0100, Kay Sievers wrote:
>> On 11/14/06, Mark Rosenstand <mark at borkware.net> wrote:
>>> On Tue, 2006-11-14 at 18:03 +0100, Kay Sievers wrote:
>>>> On 11/13/06, David Zeuthen <david at fubar.dk> wrote:
>>>>> Going forward we probably want to rethink how we do coldplug and ensure
>>>>> it's synchronized with the rest of the system. Which probably means
>>>>> recommending distributors to start HAL just before udev (without any
>>>>> sysfs coldplug) and then relying on udev's coldplugging code to emit the
>>>>> right uevents. But there are probably subtble issues to doing that;
>>>>> you'd have to ensure that all entries that HAL care about in sysfs
>>>>> actually triggers uevents. That's definitely not true today. Kay?
>>>> We can get all what we need from udev. The coldplug-code in udev and
>>>> HAL is indentical. The reworked HAL coldplug (current git) is almost a
>>>> plain copy of the udevtrigger (version 102) code.
>>>>
>>>> But we would need to move to /lib/hal and /sbin with all the tools,
>>>> because some (confused) people think that /usr should be on a
>>>> different partition, or worse behind a different storage adapter or
>>>> even on nfs. I'm totally convinced that this is crazy, but I'm almost
>>>> never able to make my point with these guys. :)
>>>>
>>>>> Starting HAL late and doing coldplug while other processes are loading
>>>>> drivers (cause uevents to be triggered) is just too dangerous and leads
>>>>> to bugs like these I think. Danny's fix is appropriate right now, it's
>>>>> probably better not to crash and just have one device less than to
>>>>> totally crash.
>>>> Right. We should give it a try to move HAL to the rootfs, and
>>>> integrate it into the udev colplug process. It sounds like a nice
>>>> option, even when we break some silly setups, it's probably worth to
>>>> do it that way.
>>> Does this mean that dbus and hal all have to be in initramfs for distros
>>> that use a completely dynamic /dev?
>> No, coldplug makes only sense after the rootfs is mounted.
> 
> But I rely on udev to create a device node for the root filesystem.
> 
> If I'm abusing udevtrigger, then what's the correct approach to do this?
> 

Yes you are. All I can do is point you to LFS or Gentoo's baselayout to
see how they do it. There's a couple of different ways the different LFS
docs do it AFAIK (or it could be different views on it on the ML)

-- 
Doug Goldstein <cardoe at gentoo.org>
http://dev.gentoo.org/~cardoe/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/hal/attachments/20061117/4f2026e7/signature.pgp


More information about the hal mailing list