Bug#239111: Grub is shockingly bad code

Robert Millan rmh at aybabtu.com
Mon Jan 12 21:03:21 UTC 2009


On Mon, Jan 12, 2009 at 08:13:52PM +0000, Robert McQueen wrote:
> >   - sync is not enough
> >     (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239111#53)
> 
> Correct. This is a property of XFS. As I said, it considers that putting
> metadata into the journal, and knowing it's flushed there, to meet the
> API guarantee of sync(). sync() doesn't make any guarantee that the
> files can be found by an an incomplete implementation of the filesystem
> (such as GRUB's, which ignores the journal).

There was a conscious decision to avoid implementing journaling.  I don't
remember why;  code size, I guess.

> >   - xfs_freeze could hang even if you don't write anything
> >     (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239111#194)
> 
> I believe this report is unreliable, perhaps it froze because it's made
> an echo in a process whose stdout is being logged?

Good catch.  Ok, then I'm fine with that approach.

> I will try to find some time to test
> it as well as Ben's simple freeze; unfreeze patch which I prefer,

You mean the one in #242 ?  This looks good to me.

Btw, Ben, could you test your patch on GRUB 2 too?  It probably has exactly
the same problem.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."





More information about the Pkg-grub-devel mailing list