From: "Jack Andrews" <effbiae@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: wanting to use mmap
Date: Mon, 31 Dec 2007 21:06:14 +1100 [thread overview]
Message-ID: <2cf50a010712310206v2e116cbclc25e812846bd4030@mail.gmail.com> (raw)
hi all,
i read the O_DIRECT january thread:
http://kerneltrap.org/mailarchive/linux-kernel/2007/1/11/44365
i am interested in using mmap as a quick way of getting data
to and from disk. i also want to handle errors (like bad blocks)
as well as is possible using usual read/write calls.
would i be right in saying that
a) mmap+madvise+msync
provides almost the same function as
b) read/write(2)+posix_fadvise+fsync
i have read that fault-tolerance or error-handling is 'better'
using (b). what does this mean exactly? i note that write(2)
may return EIO - what happens if the same underlying error
occurs when accessing a mmap'ed file? i notice that in the
implementation of msync, fsync is called so errno might be
set to EIO...
ta, jack
(please cc: me)
reply other threads:[~2007-12-31 10:06 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=2cf50a010712310206v2e116cbclc25e812846bd4030@mail.gmail.com \
--to=effbiae@gmail.com \
--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®