From: Phillip Susi <psusi@ubuntu.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Subject: Re: O_SYNC
Date: Thu, 14 Feb 2013 15:44:30 -0500 [thread overview]
Message-ID: <511D4CAE.1060403@ubuntu.com> (raw)
In-Reply-To: <511D073D.2040005@gmail.com>
-----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-----
next prev parent reply other threads:[~2013-02-14 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-14 15:05 Everything and the kitchen sink Phillip Susi
2013-02-14 15:48 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-02-14 19:34 ` Phillip Susi
2013-02-14 20:44 ` Phillip Susi [this message]
2013-03-20 14:15 ` Do not use O_SYNC Phillip Susi
2015-01-05 19:07 ` Phillip Susi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=511D4CAE.1060403@ubuntu.com \
--to=psusi@ubuntu.com \
--cc=grub-devel@gnu.org \
--cc=phcoder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.