mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* wanting to use mmap
@ 2007-12-31 10:06 Jack Andrews
  0 siblings, 0 replies; only message in thread
From: Jack Andrews @ 2007-12-31 10:06 UTC (permalink / raw)
  To: linux-kernel

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-31 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-31 10:06 wanting to use mmap Jack Andrews

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®