summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-metadata.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-metadata.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c
index 5839ddc2e0f..e7653030e45 100644
--- a/xlators/cluster/afr/src/afr-self-heal-metadata.c
+++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c
@@ -431,6 +431,13 @@ afr_selfheal_metadata (call_frame_t *frame, xlator_t *this, inode_t *inode)
if (ret)
goto unlock;
+ /* Restore atime/mtime for files that don't need data heal as
+ * restoring timestamps happens only as a part of data-heal.
+ */
+ if (!IA_ISREG (locked_replies[source].poststat.ia_type))
+ afr_selfheal_restore_time (frame, this, inode, source,
+ healed_sinks, locked_replies);
+
ret = afr_selfheal_undo_pending (frame, this, inode, sources,
sinks, healed_sinks,
undid_pending,