diff options
author | Sheetal Pamecha <spamecha@redhat.com> | 2020-01-02 12:05:12 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2020-01-24 04:35:38 +0000 |
commit | 7dc4122b84c93cfa6355002fa651a806706e4990 (patch) | |
tree | 3cd51e663ee2f508d646dbe2d0d0dfce52ff4840 /xlators/cluster | |
parent | 22b8564e781d2113327a0dc17dd4414a6386f2e1 (diff) |
afr: restore timestamp of files during metadata heal
For files: During metadata heal, we restore timestamps
only for non-regular (char, block etc.) files.
Extenting it for regular files as timestamp is updated
via touch command also
fixes: bz#1787274
Change-Id: I26fe4fb6dff679422ba4698a7f828bf62ca7ca18
Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-metadata.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-metadata.c b/xlators/cluster/afr/src/afr-self-heal-metadata.c index ecfa791b8cb..f4e31b65bf9 100644 --- a/xlators/cluster/afr/src/afr-self-heal-metadata.c +++ b/xlators/cluster/afr/src/afr-self-heal-metadata.c @@ -421,12 +421,8 @@ 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); + 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, |