lkml.org 
[lkml]   [2015]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] vfs: add a O_NOMTIME flag
On Tue, 14 Jul 2015 15:13:00 +0200 Pavel Machek <pavel@ucw.cz> wrote:

> Hi!
>
> > BTW When you "swap" to a file the mtime doesn't get updated. No one seems to
> > complain about that. I guess it is a rather narrow use-case though.
>
> Actually yes, I'd like to complain.
>
> It was not swap, it was mount -o loop, but I guess that's the same
> case. Then rsync refused to work on that file... and being on slow ARM
> system it took me a while to figure out WTF is going on.
>
> So yes, we have problems with mtime, and yes, they matter.
> Pavel

Odd...
I assume you mean
mount -o loop /some/file /mountpoint

and then when you write to the filesystem on /mountpoint the mtime
of /some/file doesn't get updated?
I think it should.
drivers/block/loop.c uses vfs_iter_write() to write to a file.
That calls f_op->write_iter which will typically call
generic_file_write_iter() which will call file_update_time() to update
the time stamps.

What filesystem was /some/file on?
I just did some testing on ext4 and it seems to do the right thing
mtime gets updated.

NeilBrown


\
 
 \ /
  Last update: 2015-07-15 07:21    [W:0.248 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site