public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Hugh Dickins <hugh@veritas.com>, Keith Owens <kaos@ocs.com.au>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.4.18 no timestamp update on modified mmapped files
Date: Wed, 12 Jun 2002 00:56:25 -0700	[thread overview]
Message-ID: <3D06FEA9.AB40CC79@zip.com.au> (raw)
In-Reply-To: <Pine.LNX.4.21.0206111006300.1028-100000@localhost.localdomain> from "Hugh Dickins" at Jun 11, 2002 10:10:28 AM <E17I2kQ-000757-00@the-village.bc.nu>

Alan Cox wrote:
> 
> > On Tue, 11 Jun 2002, Andrew Morton wrote:
> > >
> > > I think it's too late to fix this in 2.4.  If we did, a person
> > > could develop and test an application on 2.4.21, ship it, then
> > > find that it fails on millions of 2.4.17 machines.
> >
> > Oh, please reconsider that!  Doesn't loss of modification time
> > approach data loss?  Surely we'll continue to fix any data loss
> > issues in 2.4, and be grateful if you fixed this mmap modtime loss.
> 
> It doesnt approach data loss, when doing incremental backups it
> *is* data loss. Ditto with rsync --newer

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).

2: Resurrect delayed-allocation patches, use their reservation
   API to generate the SIGBUS.

3: Record the fact that there has been a data loss in the mapping
   and return that information to a subsequent msync(). (I have
   most-of-a-patch for this.  It's fairly murky).

4: Dirty the page again if writepage() failed.  This fills the machine
   up with unfreeable pages, but emitting ENOSPC messages into the
   logs may be acceptable - the operator makes some space, the data
   gets written and the messages stop.

-

  reply	other threads:[~2002-06-12  7:52 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 [this message]
2002-06-12 14:52                 ` Hugh Dickins
2002-06-13  2:25                   ` jw schultz
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=3D06FEA9.AB40CC79@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hugh@veritas.com \
    --cc=kaos@ocs.com.au \
    --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