At Thu, 1 Nov 2001 11:31:13 +0100,
Jochen Hoenicke wrote:
> There is still a problem with the linux "sync" behaviour and it's
> partition handling.  Linux has its own buffer cache for each block
> device, e.g one cache for /dev/hda and one for /dev/hda1.  If you read
> a block from /dev/hda it is placed in its buffer cache.  Then you can
> write something to the same block over /dev/hda1 flush it to disk, but
> the buffer cache of /dev/hda doesn't notice that and still reads the
> old data.  There is no call to invalidate that cached data.  As grub
> accesses the disk through /dev/hda while linux fs driver access it
> through the partition /dev/hda1 they can be out of sync despite
> calling sync everywhere.

So, the grub shell writes data to partitions of a disk instead of the
whole disk, whenever possible, only on Linux. See the definition of
the function `devwrite'. It might be better to use the same way in
devread as well, but I don't think this could be necessary in the
reality, because ordinary users don't read files again after writing
something to them in the grub shell.

Okuji

_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to