mmap on tmpfs not updating mtime

Ronald Klop ronald-lists at klop.ws
Thu Jan 22 13:28:35 UTC 2015


Hello,

Tested on 10.1-STABLE/amd64 and 11-CURRENT/arm.

I spotted this because rrdtool didn't update mtime of the database files  
so they were not backuped by my rsync scripts.

I remembered and found these mails from November 2014 about mtime+mmap on  
ZFS.
https://lists.freebsd.org/pipermail/freebsd-stable/2014-November/081138.html
which resulted in
https://lists.freebsd.org/pipermail/freebsd-stable/2014-December/081184.html

My tests with the test program in the November mails result in:
On 10.1-STABLE/ZFS its OK:
$ 14:18:08 ronald at sjakie [~/test]
ls -lT mdata; /tmp/a.out mdata; ls -lT mdata
-rw-------  1 ronald  staff  1024 Jan 22 14:18:08 2015 mdata
-rw-------  1 ronald  staff  1024 Jan 22 14:18:10 2015 mdata

On 11/UFS its OK:
$ 14:16:16 ronald at sheeva [~/test]
ls -lT mdata; /tmp/a.out mdata; ls -lT mdata
-rw-------  1 ronald  staff  1024 Jan 22 14:16:16 2015 mdata
-rw-------  1 ronald  staff  1024 Jan 22 14:16:21 2015 mdata

On 11/tmpfs it fails: (same on 10.1-STABLE/tmpfs)
$ 14:15:44 ronald at sheeva [/tmp]
ls -lT mdata; /tmp/a.out mdata; ls -lT mdata
-rw-------  1 ronald  wheel  1024 Jan 22 14:15:37 2015 mdata
-rw-------  1 ronald  wheel  1024 Jan 22 14:15:37 2015 mdata

Should a similar patch as ZFS got be applied to tmpfs?

Regards,
Ronald.


More information about the freebsd-stable mailing list