summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/resource.py
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2014-12-23 21:13:32 +0530
committerVenky Shankar <vshankar@redhat.com>2014-12-25 09:48:57 -0800
commit92cc5d4f64d55675b45b85f612f513500d4e4fc7 (patch)
tree934d1e948edd21fffe535905ca7fcceb029e018b /geo-replication/syncdaemon/resource.py
parent0299f7f0f7c4d8e5e7e04d8bc1787ecbee6dbe52 (diff)
geo-rep: Sync atime, mtime to slave when SETATTR
Existing geo-rep only syncs chown and chmod, with this patch geo-rep also syncs atime and mtime. Change-Id: Iea52d86682873bb4a47eeb0d325f5b9ddf2de2cf Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1176934 Reviewed-on: http://review.gluster.org/9331 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r--geo-replication/syncdaemon/resource.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py
index 1e11b980ad3..c20a243352b 100644
--- a/geo-replication/syncdaemon/resource.py
+++ b/geo-replication/syncdaemon/resource.py
@@ -669,9 +669,13 @@ class Server(object):
mode = e['stat']['mode']
uid = e['stat']['uid']
gid = e['stat']['gid']
+ atime = e['stat']['atime']
+ mtime = e['stat']['mtime']
go = e['go']
errno_wrap(os.chmod, [go, mode], [ENOENT], [ESTALE, EINVAL])
errno_wrap(os.chown, [go, uid, gid], [ENOENT], [ESTALE, EINVAL])
+ errno_wrap(os.utime, [go, (atime, mtime)],
+ [ENOENT], [ESTALE, EINVAL])
@classmethod
@_pathguard