From: Pavel Roskin <[EMAIL PROTECTED]>
Subject: Re: Yet two patches
Date: Thu, 16 Sep 1999 14:54:32 +0400 (EEST)

> First of all, BLKFLSBUF is IMHO misnamed in Linux. It invalidates the
> buffers, which is probably not the same as flushing.

  I can imagine you have not read the Linux source code carefully. :-p
When invalidating the buffer, of course, it flushes it if it has been
modified.

> In fact, I can't imagine any bad consequences of non-flushing the buffers,
> so I would prefer either leave the code as is or remove it for Linux too.

  That depends on how to maintain the buffer cache. If an OS maintains
it in per device way, we need to flush the buffer. An example is:

1. Mount /dev/hda1 on somewhere
1. Write data to /dev/hda
2. Write data to /dev/hda1

In this case, we cannot promise the first IDE disk has consistent
data. At least when I read the code in Linux, Linux uses per device
way. Thus, we should invalidate the buffer cache. I don't know what
way FreeBSD uses. (Likewise, we should invalidate it on Hurd, but I
don't think storeio has this facility.)

----------------------------------------------------------------------
OKUJI Yoshinori  <[EMAIL PROTECTED]>           ^o-o^
http://duff.kuicr.kyoto-u.ac.jp/~okuji (in English)     m /

Reply via email to