[PATCH ]Re: hal doesn't recognize mounting of devices
Jon Nettleton
jon.nettleton at gmail.com
Tue Oct 25 07:07:33 PDT 2005
On Tue, 2005-10-25 at 14:56 +0200, Danny Kukawka wrote:
> On Tuesday 25 October 2005 00:41, Jon Nettleton wrote:
> > I have already found this lone post to the kernel about the problem,
> > http://lkml.org/lkml/2005/9/14/138 . I have done some of my own testing
> > and basically come to the conclusion, this is less likely to happen when
> > not using preemption, however it can be triggered. The ridiculously
> > simple patch I am using right now which seems to work fine is this.
>
> If I see this rigth it's really a kernel bug if you use voluntary preempt
> kernel. Is this in any distro-default kernel? Not really sure if we should
> workaround this defaultly.
>
> Btw. I attached a patch as workaround. Maybe someone could test this and check
> the sleep (maybe also higher and lower values). I added a retry instead of a
> sleep before check /proc/mounts to prevent delay on systems where this work
> correct. Unfortunately we have now a delay (0.2 seconds) with relly unmounted
> devices. The only solution would be add a key to enable/disable the retry
> (disabled by default and only enable with fdi file).
>
> Please review and comment.
>
> Cheers,
>
> Danny
>
> ChangeLog | 8 ++++++
> hald/linux2/blockdev.c | 52 +++++++++++++++++++++++++--------------
> 2 files changed, 42 insertions(+), 18 deletions(-)
> _______________________________________________
> hal mailing list
> hal at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/hal
>
Thanks for the patch. I had to bump the delay to 0.3 seconds to get
everything to reliably mount and unmount on my machines. Other than
that it works as expected.
I was wondering if this wouldn't be the perfect place to use inotify.
Setup an inotify watch on /proc/mounts and block until we get the write
finished event. Just a thought.
-Jon
More information about the hal
mailing list