mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Ho Chak Hung <hunghochak@netscape.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How does ramfs actually fills the page cache with data?
Date: Sat, 23 Jun 2001 15:50:31 +0200	[thread overview]
Message-ID: <20010623155030.Q754@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <65E4C5C3.33174328.0F76C228@netscape.net>
In-Reply-To: <65E4C5C3.33174328.0F76C228@netscape.net>; from hunghochak@netscape.net on Fri, Jun 22, 2001 at 05:45:27PM -0400

On Fri, Jun 22, 2001 at 05:45:27PM -0400, Ho Chak Hung wrote:
> In fs/ramfs/inode.c, how does ramfs actually fills the page
> cache with data? In the readpage operation, it only zero-fill
> the page if it didn't already exist in the page cache. However,
> how do I actually fill the page with data?

The page cache does it itself. 

"readpage" is to move pages from the backing store into the page
cache. 

"writepage" and friends is for updating the backing store with
the contents of the page cache.

There is no real backing store of ramfs, since ramfs data lives
completly in page cache. 

But we cannot give the user random memory contents, so we zero it
out on readpage and prepare_write.

The data is copied with copy_{from,to}_user in the generic file
operations (look how ramfs_file_operations is defined and look at
the functions referenced), which read/write through page cache.

Regards

Ingo Oeser
-- 
Use ReiserFS to get a faster fsck and Ext2 to fsck slowly and gently.

  reply	other threads:[~2001-06-23 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-22 21:45 Ho Chak Hung
2001-06-23 13:50 ` Ingo Oeser [this message]
2001-06-25  3:01 Ho Chak Hung

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=20010623155030.Q754@nightmaster.csn.tu-chemnitz.de \
    --to=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=hunghochak@netscape.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®