[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub