From: Magnus Ahltorp <map@stacken.kth.se>
To: "Benjamin C.R. LaHaise" <blah@kvack.org>
Cc: linux-mm@kvack.org
Subject: Re: MM question
Date: 22 Feb 1999 22:13:09 +0100 [thread overview]
Message-ID: <ixdn2266t22.fsf@turbot.pdc.kth.se> (raw)
In-Reply-To: "Benjamin C.R. LaHaise"'s message of "Sun, 21 Feb 1999 16:34:32 -0500 (EST)"
> The code listed is just plain wrong -- it doesn't take into account pages
> that are already present in the page cache. If you need to use this
> technique, take a look at mm/filemap.c:generic_file_write for an example
> of how to do this properly (mostly, find the page in the page cache, if
> not found add it; lock page in page cache).
Since I didn't write the code myself, it doesn't express my
intentions, but rather someone else's, so don't look at it too much.
> Could you clairify how you're doing things? Are pages cached in the
> kernel owned by your filesystem's inode or ext2's? The hint I'm getting
> from the code you quoted is the both are storing the data, which is
> inefficient. The easiest thing to do would be to tunnel all operations to
> the ext2 inode -- your filesystem should not have a readpage function.
> Rather, mmap(), read() and write() all receive the ext2 inode of the file,
> so that all pages in memory are owned by the ext2 inode, and your inode is
> merely an indirect handle that validates the cache. How's that sound?
Right now, an Arla inode has some extra information, containing a
dentry for the cache file. The readpage() function just validates the
cache information, fills in a struct file (with the ext2 inode) and
calls ext2's readpage(). The struct page pointer is passed along to
ext2's readpage() without any modifications.
The write() does pretty much the same thing, just that here the data
is passed via a pointer and a length.
I don't really know what's supposed to happen during a readpage()
call, and what I want is a way to make write() affect the pages that
readpage() has read.
(I might sound somewhat disoriented, but that is because I am)
If you want to have a look at the particular source, the relevant file
is http://www.stacken.kth.se/~map/src/cvs/arla/xfs/linux/xfs_inodeops.c
(xfs_readpage() and xfs_write_file()).
/Magnus
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-02-22 21:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-21 19:53 Magnus Ahltorp
1999-02-21 21:34 ` Benjamin C.R. LaHaise
1999-02-22 21:13 ` Magnus Ahltorp [this message]
1999-02-24 17:36 ` Benjamin C.R. LaHaise
1999-02-24 17:55 ` Magnus Ahltorp
1999-03-15 18:05 ` Stephen C. Tweedie
-- strict thread matches above, loose matches on Subject: below --
1999-02-16 2:30 Jason Titus
1999-02-18 15:06 ` Stephen C. Tweedie
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=ixdn2266t22.fsf@turbot.pdc.kth.se \
--to=map@stacken.kth.se \
--cc=blah@kvack.org \
--cc=linux-mm@kvack.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