-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While playing around with fully featured images, I noticed that
grub-setup takes ages to write the image to disk.  It seems that this
is because the disk is opened with O_SYNC, and sectors are written one
at a time.  This is terribly silly, so I was going to submit a patch
removing the flag, but I noticed that the flush code that should fsync
after writing the whole image is not actually being called.  I traced
it down to here:

grub_err_t
grub_util_biosdisk_flush (struct grub_disk *disk)
{
  struct grub_util_biosdisk_data *data = disk->data;

  if (disk->dev->id != GRUB_DISK_DEVICE_BIOSDISK_ID)
=>  return GRUB_ERR_NONE;

It seems the id is GRUB_DISK_DEVICE_HOSTDISK_ID.  What is the
intention of this check and why is it skipping the fsync?


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRHUyuAAoJEJrBOlT6nu754CEH/19lSCLHRqQlGpqGDdjWvlRS
R2uGCLdHEdfn/8+Upm4PrkWn5LH0TYTDLHDtPEhnMxbe0TfpV17KovqATwLrjVJi
k13J4JY8lhmou0JKzFx3/lP9nWcM/4GGB1nowf3VxMnfFkJqYSBiKNbL9WuJCnaV
HQgLXwRqbi2EeBUe99HM+0TRbiOoZF0umtjAVX+Wa9OikFofoTpVf+bu0eA6ysZ3
jSgjXTVmdVT/FQzUtRA0vIieqabRe7PJZv1ilNxLCUoYcK6LfMpw72jbZ3lQlMRe
kku4hnx4ZjZFv38qNdLMrr5B3D48P7+PQe+FFV04sIocsp0FidrT3mUOb/RO1Gw=
=XiGl
-----END PGP SIGNATURE-----

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to