grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] FIEMAP and disk sync issues


From: Phillip Susi
Subject: Re: [RFC] FIEMAP and disk sync issues
Date: Fri, 27 Jan 2012 14:04:01 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1

-----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 via email to

[Prev in Thread] Current Thread [Next in Thread]