From: jw schultz <jw@pegasys.ws>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.4.18 no timestamp update on modified mmapped files
Date: Wed, 12 Jun 2002 19:25:26 -0700 [thread overview]
Message-ID: <20020612192526.B6679@pegasys.ws> (raw)
In-Reply-To: <3D06FEA9.AB40CC79@zip.com.au> <Pine.LNX.4.21.0206121455560.1032-100000@localhost.localdomain>
On Wed, Jun 12, 2002 at 03:52:34PM +0100, Hugh Dickins wrote:
> On Wed, 12 Jun 2002, Andrew Morton wrote:
> >
> > A more serious form of data loss occurs when an application has a shared
> > mapping over a sparse file. If the filesystem is out of space when
> > the VM decides to write back some pages, your data simply gets dropped
> > on the floor. Even a subsequent msync() won't tell you that you have
> > a shiny new bunch of zeroes in your file.
> >
> > It's not simple to fix. Approaches might be:
> >
> > 1: Map the page to disk at fault time, generate SIGBUS on
> > ENOSPC (the standards don't seem to address this issue, and
> > this is a non-standard overload of SIGBUS).
>
> I believe your option 1 is closest to the right direction; and SIGBUS
> is entirely appropriate, I don't see it as a non-standard overload.
I concur that #1 is closest. I'd prefer it to happen on a
write fault rather read but the frequency with which
this should occur is low enough i wouldn't sweat it.
It is a non-standard overload of SIGBUS. SIGBUS is to
indicate an unaligned memory access or otherwise malformed
address. Many confuse SIGBUS with SIGSEGV because they are
usually symptoms of the same problems but a SIGSEGV is to
indicate memory protection violation (unresolvable page
fault) which is not the same as a malformed address. I
believe Linux, at least on x86 maps both errors to SIGSEGV.
I would think SIGXFSZ might be a better fit.
>
> But you didn't spell out the worst news on that option: read faults
> into a read-only shared mapping of a file which the application had
> open for read-write when it mmapped: the page must be mapped to disk
> at read fault time (because the mapping just might be mprotected for
> read-write later on, and the page then dirtied).
>
>
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt
next prev parent reply other threads:[~2002-06-13 2:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-11 5:33 2.4.18 no timestamp update on modified mmapped files Keith Owens
2002-06-11 6:17 ` Andrew Morton
2002-06-11 6:29 ` Keith Owens
2002-06-11 6:49 ` Andrew Morton
2002-06-11 7:07 ` Keith Owens
2002-06-11 7:28 ` Andrew Morton
2002-06-11 9:10 ` Hugh Dickins
2002-06-11 9:33 ` Andrew Morton
2002-06-11 9:51 ` Hugh Dickins
2002-06-12 7:40 ` Alan Cox
2002-06-12 7:56 ` Andrew Morton
2002-06-12 14:52 ` Hugh Dickins
2002-06-13 2:25 ` jw schultz [this message]
2002-06-13 9:58 ` Hugh Dickins
2002-06-13 10:40 ` jw schultz
2002-06-11 18:09 ` Robert Love
2002-06-12 17:17 ` Pavel Machek
2002-06-11 6:39 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2002-06-15 5:24 Kevin Easton
2002-06-15 8:10 ` Hugh Dickins
2002-06-15 9:12 ` Kevin Easton
2002-06-15 9:23 ` Russell King
2002-06-16 4:35 Kevin Easton
2002-06-16 16:35 ` Hugh Dickins
2002-06-19 17:57 Randy.Dunlap
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=20020612192526.B6679@pegasys.ws \
--to=jw@pegasys.ws \
--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