From f8fe0771f0b450713595a7d298ed5a758cf2ce3e Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 2 Apr 2018 08:31:25 -0400 Subject: posix/ctime: posix hook to set ctime xattr in relevant fops This patch uses the ctime posix APIs to set consistent time across replica on disk. It also stores the time attributes in the inode context. Credits: Rafi KC Updates: #208 Change-Id: I1a8d74d1e251f1d6d142f066fc99258025c0bcdd Signed-off-by: Kotresh HR --- xlators/storage/posix/src/posix-metadata.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (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 a6bde785abe..48744fd8186 100644 --- a/xlators/storage/posix/src/posix-metadata.h +++ b/xlators/storage/posix/src/posix-metadata.h @@ -38,13 +38,16 @@ posix_get_mdata_xattr (xlator_t *this, const char *real_path, int _fd, int __posix_get_mdata_xattr (xlator_t *this, const char *real_path, int _fd, inode_t *inode, struct iatt *stbuf); -int -posix_set_mdata_xattr (xlator_t *this, const char *real_path, int fd, - inode_t *inode, struct timespec *time, - struct iatt *stbuf, posix_mdata_flag_t *flag); -int +void posix_update_utime_in_mdata (xlator_t *this, const char *real_path, int fd, inode_t *inode, 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 +posix_set_parent_ctime (call_frame_t *frame, xlator_t *this, + const char* real_path, int fd, inode_t *inode, + struct iatt *stbuf); gf_boolean_t is_ctime_enabled(); -- cgit