bug-grub
[Top][All Lists]
Advanced

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

Worse yet Re: Whoops! Re: [PATCH] Another semi-critical one... (was Re:


From: erich
Subject: Worse yet Re: Whoops! Re: [PATCH] Another semi-critical one... (was Re: towards 0.91 )
Date: Sat, 27 Oct 2001 14:30:32 -0700

address@hidden wrote:

> OK, I feel a bit sheepish...
> 
> "sync" is already being called from the grub shell, which only makes
> sense...  so in general the fix I posted should have been a no-op.  It's
> not a bug per se, just unnecessary.
> 
> But on RedHat 7.2 with the kernel update to 2.4.9-7, something is
> busted to make me have to call it explicitly in the shell script.
> 
> Effectively, the "sync" call was made several times with some small
> delays in-between.

I just realized what the real bug is, and it's a problem for the
GRUB shell in general, and "grub-install" especially.

The "sync" system call, as a performance enhancement, almost certainly
returns when the journal for the metadata is finished being written
rather than waiting for the journal to be emptied to the final on-disk
structures like GRUB expects.

My guess is that all the other journaled filesystems will have this
problem too.  I am fairly certain that XFS has this behavior with the
"sync" system call, and it's possible that JFS and ReiserFS would as
well.


So, the extra bit of time that was gained by calling the "sync" program
in the patch to the "grub-install" script did something, but wasn't
even then guaranteeing the result.

The "grub-install" script exacerbates this problem by doing several
file copies and then immediately referring to the result. 


Maybe we should change the "sync" to "sync then sleep for 2 seconds"
or something to help the journal to get out?

--
    Erich Stefan Boleyn     <address@hidden>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]