]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix snap directory atime 36169/head
authorLuis Henriques <lhenriques@suse.com>
Wed, 11 Mar 2020 11:10:05 +0000 (11:10 +0000)
committerNathan Cutler <ncutler@suse.com>
Sat, 18 Jul 2020 15:26:47 +0000 (17:26 +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 3a02b72c2ba2903bcabbc392709a594aef68787a..6f277ecac89c9059d79fe1017eb0a77800201a62 100644 (file)
@@ -10698,6 +10698,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;