bug-grub
[Top][All Lists]
Advanced

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

Re: Worse yet Re: Whoops! Re: [PATCH] Another semi-critical one... (was


From: Yoshinori K. Okuji
Subject: Re: Worse yet Re: Whoops! Re: [PATCH] Another semi-critical one... (was Re: towards 0.91 )
Date: Wed, 07 Nov 2001 23:19:25 +0900
User-agent: Wanderlust/2.6.0 (Twist And Shout) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (Unebigoryomae) APEL/10.3 Emacs/20.7 (i586-pc-linux-gnu) MULE/4.0 (HANANOEN)

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



reply via email to

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