From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: Partition device synchronisation Date: Fri, 11 May 2012 17:33:20 +0200 Message-ID: <4FAD3140.5090707@gmail.com> References: <4FAC4208.1070308@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigDE001D6F3AAA7E6A1337EBAC" Cc: linux-fsdevel@vger.kernel.org To: Jeff Moyer Return-path: Received: from mail-wi0-f170.google.com ([209.85.212.170]:53051 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756853Ab2EKPdn (ORCPT ); Fri, 11 May 2012 11:33:43 -0400 Received: by wibhm4 with SMTP id hm4so1621229wib.1 for ; Fri, 11 May 2012 08:33:42 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDE001D6F3AAA7E6A1337EBAC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.05.2012 15:39, Jeff Moyer wrote: > "Vladimir '=CF=86-coder/phcoder' Serbinenko" writes= : > >> Hello, all. In GRUB we have tools to discover various parameters as to= >> how GRUB would see the disks on boot and for this we run the same code= >> as we have in boot time in userspace. So most natural for us would be >> accessing whole disks like sda but unfortunately its cache isn't kept >> synchronous with partitions (e.g. sda1), so if FS driver writes >> something to sda1 it won't be visible through sda until pages are >> dropped. Right now in Linux-specific code we try to find which partiti= on >> of sda starts at given sector (e.g. 2048) by trying all partition Linu= x >> sees in order to read from sda1 rather than sda. The code is ugly and >> sometimes create issues. So my questions are: >> 1) Do we have to issue some ioctl to reload those caches? > You can issue the BLKFLSBUF ioctl. > >> 2) Is it considered a bug and should I plunge forward, fix it and send= a >> patch? > This is debatable. See this thread: > http://thread.gmane.org/gmane.linux.kernel/1241227/focus=3D1244202 Thank you, it's all clear to me now. I'll make a patch based on this information and ask the affected user to test it. > Cheers, > Jeff > --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigDE001D6F3AAA7E6A1337EBAC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk+tMUwACgkQNak7dOguQgmANAD/RFr/K/uXdVgeXgD5rkmf5v4d l3pqZANMtUs1Gh3fIqYBAKsdLq2cdZmniMHBxga8J2pevW1mlj+NKJB8LLhCMFCk =J5Yv -----END PGP SIGNATURE----- --------------enigDE001D6F3AAA7E6A1337EBAC--