LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* mmap / mtime updates
@ 2007-01-09 22:09 Marek Michalkiewicz
  2007-01-11 22:46 ` Peter Staubach
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Michalkiewicz @ 2007-01-09 22:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: staubach

Hello,

What is the current status of the bug where modifications to file
contents made via mmap fail to update mtime of the file?

This was discussed a few months ago in this thread:

http://lkml.org/lkml/2006/5/17/138

where patches have been posted, but it seems that no final solution
has been agreed on and applied to the kernel tree.  Updating ctime
and mtime appears to be required by the standard:

  http://www.opengroup.org/onlinepubs/009695399/functions/mmap.html

  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.

and failing to do it can lead to potential data loss as well, if
modified files are not backed up (I'm seeing the problem with Samba
tdb files not being backed up by rsnapshot, for example).

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmap / mtime updates
  2007-01-09 22:09 mmap / mtime updates Marek Michalkiewicz
@ 2007-01-11 22:46 ` Peter Staubach
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Staubach @ 2007-01-11 22:46 UTC (permalink / raw)
  To: Marek Michalkiewicz; +Cc: linux-kernel

Marek Michalkiewicz wrote:
> Hello,
>
> What is the current status of the bug where modifications to file
> contents made via mmap fail to update mtime of the file?
>
> This was discussed a few months ago in this thread:
>
> http://lkml.org/lkml/2006/5/17/138
>
> where patches have been posted, but it seems that no final solution
> has been agreed on and applied to the kernel tree.  Updating ctime
> and mtime appears to be required by the standard:
>
>   http://www.opengroup.org/onlinepubs/009695399/functions/mmap.html
>
>   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.
>
> and failing to do it can lead to potential data loss as well, if
> modified files are not backed up (I'm seeing the problem with Samba
> tdb files not being backed up by rsnapshot, for example).

I am working on porting the patches to the current upstream kernel.
As soon as I complete this work, then I will repost the patch and
we'll see where things go then.

    Thanx...

       ps

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-11 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-09 22:09 mmap / mtime updates Marek Michalkiewicz
2007-01-11 22:46 ` Peter Staubach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).