From: Sebastien Morand <sebastien@telesol.usm.my>
To: linux-kernel@vger.kernel.org
Subject: About mmap
Date: Thu, 31 Oct 2002 22:05:09 +0800 [thread overview]
Message-ID: <20021031140509.GA2296@telesol.usm.my> (raw)
I'm implementing a cache for a database file system. Using mmap I
would like to know how mmap works.
For instance if my file is open in read/write and I'm mapping in
read/write but I use only the block in write, is the kernel going to
read on the disk?
Here is a sample code:
int h = open(file, O_RDWR | O_SYNC);
void * memory =
mmap(0, pageSize, PROT_WRITE | PROT_READ, MAP_SHARED, handle, 0);
I'm actually using the same code to get read or write block, so if I'm
using the block in write only I would like to know if this code is
correct or if I'd better change the flags according to writing or
reading access.
Sincerely,
Sebastien Morand.
NB: I'm not on the mailing list, can you put my e-mail in CC to reply
please.
reply other threads:[~2002-10-31 13:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20021031140509.GA2296@telesol.usm.my \
--to=sebastien@telesol.usm.my \
--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®