From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Rqr5i-0005fu-Pv for mharc-grub-devel@gnu.org; Fri, 27 Jan 2012 14:04:06 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqr5g-0005fj-7s for grub-devel@gnu.org; Fri, 27 Jan 2012 14:04:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rqr5f-0003I0-1P for grub-devel@gnu.org; Fri, 27 Jan 2012 14:04:04 -0500 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:31409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqr5e-0003Hv-VM for grub-devel@gnu.org; Fri, 27 Jan 2012 14:04:03 -0500 X-Authority-Analysis: v=2.0 cv=TqVkdUrh c=1 sm=0 a=/DbS/tiKggfTkRRHPZEB4g==:17 a=seg9fo12g4kA:10 a=P7dZfOPP_tkA:10 a=S1A5HrydsesA:10 a=IkcTkHD0fZMA:10 a=xe8BsctaAAAA:8 a=a9y5Rz5wIw6aRUFiC94A:9 a=qeusKK2LnvgDE39FPSsA:7 a=QEXdDO2ut3YA:10 a=/DbS/tiKggfTkRRHPZEB4g==:117 X-Cloudmark-Score: 0 X-Originating-IP: 67.78.168.186 Received: from [67.78.168.186] ([67.78.168.186:52088] helo=[10.1.1.230]) by cdptpa-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 13/C4-20593-125F22F4; Fri, 27 Jan 2012 19:04:01 +0000 Message-ID: <4F22F521.30104@ubuntu.com> Date: Fri, 27 Jan 2012 14:04:01 -0500 From: Phillip Susi User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [RFC] FIEMAP and disk sync issues References: <4F22A683.4020607@gmail.com> In-Reply-To: <4F22A683.4020607@gmail.com> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.180.132.120 Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 19:04:05 -0000 -----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-----