From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: Anton Salikhmetov <salikhmetov@gmail.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, joe@evalesco.com
Subject: Re: [PATCH][RFC][BUG] updating the ctime and mtime time stamps in msync()
Date: Wed, 9 Jan 2008 15:41:11 +0100 [thread overview]
Message-ID: <9a8748490801090641s41a06c1era3764091f135567d@mail.gmail.com> (raw)
In-Reply-To: <4df4ef0c0801090332y345ccb67se98409edc65fd6bf@mail.gmail.com>
On 09/01/2008, Anton Salikhmetov <salikhmetov@gmail.com> wrote:
> Since no reaction in LKML was recieved for this message it seemed
> logical to suggest closing the bug #2645 as "WONTFIX":
>
> http://bugzilla.kernel.org/show_bug.cgi?id=2645#c15
>
> However, the reporter of the bug, Jacob Oestergaard, insisted the
> solution to be resubmitted once more:
>
Good idea. The bug is real and should be fixed IMHO.
...
> This bug causes backup systems to *miss* changed files.
>
> This bug does cause data loss in common real-world deployments (I gave an
> example with a database when posting the bug, but this affects the data from
> all mmap using applications with common backup systems).
>
Not just backup systems, but any application that relies on mtime
being correctly updated will be bitten by this.
> Silent exclusion from backups is very very nasty.
>
Agreed.
In fact if mtime is not reliable (which it is not) one could argue
that we might as well not update it at all, ever. But I think we can
all agree that just fixing it (as your patch does) is a lot better.
> Please comment on my solution or commit it if it's acceptable in its
> present form.
>
I've only looked briefly at your patch but it seems resonable. I'll
try to do some testing with it later.
Thank you for working on this long standing bug.
...
> > I would like to propose my solution for the bug #2645 from the kernel bug tracker:
> >
> > http://bugzilla.kernel.org/show_bug.cgi?id=2645
> >
> > The Open Group defines the behavior of the mmap() function as follows.
> >
> > The st_ctime and st_mtime fields of a file that is mapped with MAP_SHARED
> > and PROT_WRITE shall be marked for update at some point in the interval
> > between a write reference to the mapped region and the next call to msync()
> > with MS_ASYNC or MS_SYNC for that portion of the file by any process.
> > If there is no such call and if the underlying file is modified as a result
> > of a write reference, then these fields shall be marked for update at some
> > time after the write reference.
> >
> > The above citation was taken from the following link:
> >
> > http://www.opengroup.org/onlinepubs/009695399/functions/mmap.html
> >
...
I agree that our current behaviour is certainly not what the standard
(sensibly) requires.
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-09 14:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-07 17:54 Anton Salikhmetov, Anton Salikhmetov
2008-01-09 11:32 ` Anton Salikhmetov
2008-01-09 11:47 ` Jakob Oestergaard
2008-01-09 12:22 ` Jakob Oestergaard
2008-01-09 14:41 ` Jesper Juhl [this message]
2008-01-09 15:31 ` Anton Salikhmetov
2008-01-09 21:28 ` Peter Staubach
2008-01-09 20:50 ` Rik van Riel
2008-01-09 21:01 ` Klaus S. Madsen
2008-01-09 21:06 ` Valdis.Kletnieks
2008-01-09 22:06 ` Rik van Riel
2008-01-09 22:19 ` Peter Staubach
2008-01-09 22:33 ` Jakob Oestergaard
2008-01-09 23:41 ` Rik van Riel
2008-01-10 0:03 ` Anton Salikhmetov
2008-01-10 8:51 ` Jakob Oestergaard
2008-01-10 10:53 ` Anton Salikhmetov
2008-01-10 15:45 ` Rik van Riel
2008-01-10 15:56 ` Anton Salikhmetov
2008-01-10 16:07 ` Rik van Riel
2008-01-10 16:40 ` Anton Salikhmetov
2008-01-10 16:52 ` Peter Staubach
2008-01-10 16:46 ` Peter Staubach
2008-01-10 20:48 ` Valdis.Kletnieks
2008-01-10 0:48 ` Anton Salikhmetov
2008-01-10 0:40 ` Anton Salikhmetov
2008-01-09 21:18 ` Peter Staubach
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=9a8748490801090641s41a06c1era3764091f135567d@mail.gmail.com \
--to=jesper.juhl@gmail.com \
--cc=joe@evalesco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=salikhmetov@gmail.com \
/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