]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix snap directory atime 36039/head
authorLuis Henriques <lhenriques@suse.com>
Wed, 11 Mar 2020 11:10:05 +0000 (11:10 +0000)
committerNathan Cutler <ncutler@suse.com>
Fri, 10 Jul 2020 21:50:18 +0000 (23:50 +0200)
For consistency, also get the .snap directory atime from the parent
directory.  Otherwise, this timestamp will be kept at 1970-01-01.

Fixes: https://tracker.ceph.com/issues/46070
Signed-off-by: Luis Henriques <lhenriques@suse.com>
(cherry picked from commit 057842132600d6d5854f16600b90131075a1b509)

src/client/Client.cc

index c84da997a3389f6e5392aee087d14bd1d959856a..d09cacb11e9c7018e4b65f3656b61a85613b5f9e 100644 (file)
@@ -10748,6 +10748,7 @@ Inode *Client::open_snapdir(Inode *diri)
     in->mtime = diri->mtime;
     in->ctime = diri->ctime;
     in->btime = diri->btime;
+    in->atime = diri->atime;
     in->size = diri->size;
     in->change_attr = diri->change_attr;