Follow-up Comment #4, bug #46691 (project grub):

> GRUB also performs fsync() which should synchronize filesystem and 
> block device state. What you describe sounds more like broken filsystem 
> which fails to properly implement fsync(). Now, that was known and I 
> won't mind adding workaround for this but I want to understand what we 
> are trying to fix.

I still haven't came up to any kernel bug reports.

But as a theory, _not only on Linux_, when different process opens
a (device) file, one with O_DIRECT (I think Linux do this when mounting),
and other without O_DIRECT (grub), grub could grab stale data.

fsync() gurantees that it's written onto the (device) file,
which I confirmed during debugging, but kernel didn't
flush buffers held by process opened without O_DIRECT.
And this could be a *feature* of that operating system, not a bug.

So, IMHO if O_DIRECT is available, it's a lot safer and portable.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?46691>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to