From 304640e55c0f3c6d15f4e230dc6376e4f5020fea Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 29 Jul 2019 18:30:42 +0530 Subject: ctime/rebalance: Heal ctime xattr on directory during rebalance After add-brick and rebalance, the ctime xattr is not present on rebalanced directories on new brick. This patch fixes the same. Note that ctime still doesn't support consistent time across distribute sub-volume. This patch also fixes the in-memory inconsistency of time attributes when metadata is self healed. Change-Id: Ia20506f1839021bf61d4753191e7dc34b31bb2df fixes: bz#1734026 Signed-off-by: Kotresh HR --- xlators/storage/posix/src/posix-metadata.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/storage/posix/src/posix-metadata.h') diff --git a/xlators/storage/posix/src/posix-metadata.h b/xlators/storage/posix/src/posix-metadata.h index c17669974d2..63e8771d3b1 100644 --- a/xlators/storage/posix/src/posix-metadata.h +++ b/xlators/storage/posix/src/posix-metadata.h @@ -43,6 +43,10 @@ posix_update_utime_in_mdata(xlator_t *this, const char *real_path, int fd, inode_t *inode, struct timespec *ctime, struct iatt *stbuf, int valid); void +posix_update_ctime_in_mdata(xlator_t *this, const char *real_path, int fd, + inode_t *inode, struct timespec *ctime, + struct iatt *stbuf, int valid); +void posix_set_ctime(call_frame_t *frame, xlator_t *this, const char *real_path, int fd, inode_t *inode, struct iatt *stbuf); void @@ -56,7 +60,10 @@ posix_set_ctime_cfr(call_frame_t *frame, xlator_t *this, int fd_out, inode_t *inode_out, struct iatt *stbuf_out); int posix_set_mdata_xattr_legacy_files(xlator_t *this, inode_t *inode, + const char *realpath, struct mdata_iatt *mdata_iatt, int *op_errno); +void +posix_mdata_iatt_from_disk(struct mdata_iatt *out, posix_mdata_disk_t *in); #endif /* _POSIX_METADATA_H */ -- cgit