public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: llx@swissonline.ch
Cc: linux-kernel@vger.kernel.org
Subject: Re: confused about block device behaviour
Date: Tue, 05 Feb 2002 11:25:58 -0800	[thread overview]
Message-ID: <3C6031C6.C0CBB4C8@zip.com.au> (raw)
In-Reply-To: <200202051620.g15GKdH17123@mail.swissonline.ch>

lord latex wrote:
> 
> hi
> 
> i've got written a block device driver for the 2.4.x
> kernel and it seems to work. but something looks
> strange to me. i've go a very simple application that
> does nothing more then open the block device, read
> 1024 byte and close the device. when i run this app.
> serveral times my do_request function gets called
> every time. why? i expect this block beeing buffered
> in the buffer cache. what do i don't see, or what is
> possibly wrong with my block device?
> 

The kernel invalidates the device's cache on the final close.
If you hold the device open in a different process:

	sleep 1000 < /dev/foo

while you run the test, you'll see that the underlying device's
contents are indeed cached.

-

      reply	other threads:[~2002-02-05 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-05 16:19 confused about block device behaviour lord latex
2002-02-05 19:25 ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C6031C6.C0CBB4C8@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llx@swissonline.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox