All of lore.kernel.org
 help / color / mirror / Atom feed
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: [RFC] FIEMAP and disk sync issues
Date: Fri, 27 Jan 2012 14:04:01 -0500	[thread overview]
Message-ID: <4F22F521.30104@ubuntu.com> (raw)
In-Reply-To: <4F22A683.4020607@gmail.com>

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

On 1/27/2012 8:28 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> Hello, all. When someone installs using blocklists (discouraged
> and unreliable), we use GRUB internal fs reader in order to
> determine core.img blocklists. With Linux we call fsync and an
> ioctl on partition in order to flush the cache. I also tried adding
> "sync" which didn't make any difference. Unfortunately it doesn't
> seem to be good enough on

By "sync" you mean running the sync command?  If so, that absolutely,
positively should flush everything to disk.  If it isn't then there's
a major kernel bug.  An fsync() on the core.img file ( not the
partition device ) also should flush everything needed to find that
file, without flushing everything else that isn't.

Doing an fsync() on the partition device will flush buffers from a
process directly opening the block dev and performing IO there, not
the buffers for files within the filesystem on that block device.
IIRC, ext2 uses the block buffers for directory access so that
partition fsync will flush directories, but ext3 and ext4 do not.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPIvUhAAoJEJrBOlT6nu75ZSwH/2vgqHY3L+9xPGAsMDMzelAq
ae6P0aKgqEsZPEiTDx6+sBNE9uvJO6va5mKv9eyvDhpmKeq64mLa3EDJBKUmnSL+
E/b/cAAYPV7RaJ7Rc3tUNa96PRC8rOPyOcGeOVQxqjFS5rmZOa4p+wrO3YitqIGR
IUD7HSN8wt4PtmeS8thRXQPhcSICQwPy8rg4QVq2mFHxFws/WALAr7p5uVu/SH2Q
E8lXARKdvqd6HPjxlo7A/WeDEVvRd25eb84vX33wAhaauAI9VFD2+eCWR5ayyVUe
aymZ+DNyXpenEGK5JDdW38ovmAwIsWI+LbWVCh/gInEfHJkDVqN9XogtmCc9S68=
=3Yxi
-----END PGP SIGNATURE-----


  reply	other threads:[~2012-01-27 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27 13:28 [RFC] FIEMAP and disk sync issues Vladimir 'φ-coder/phcoder' Serbinenko
2012-01-27 19:04 ` Phillip Susi [this message]
2012-01-27 21:51   ` Phillip Susi
2012-01-27 22:18   ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-01-30 10:30 ` Goswin von Brederlow
2012-01-30 10:47   ` Vladimir 'φ-coder/phcoder' Serbinenko

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=4F22F521.30104@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.