From 9a854a98af69c1b7e06aa01dff7ea3271ebd574c Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 23 Apr 2018 04:22:09 -0400 Subject: posix/ctime: posix hooks to get consistent time xattr This patch uses the ctime posix APIs to get consistent time across replica. The time attributes are got from from inode context or from on disk if not found and merged with iatt to be returned. Credits: Rafi KC Updates: #208 Change-Id: Id737038ce52468f1f5ebc8a42cbf9c6ffbd63850 Signed-off-by: Kotresh HR --- xlators/storage/posix/src/posix.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xlators/storage/posix/src/posix.h') diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 60a7132ddcb..9712b675eb1 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -327,11 +327,12 @@ int __posix_inode_ctx_get_all (inode_t *inode, xlator_t *this, int posix_gfid_set (xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req); -int posix_fdstat (xlator_t *this, int fd, struct iatt *stbuf_p); -int posix_istat (xlator_t *this, uuid_t gfid, const char *basename, - struct iatt *iatt); -int posix_pstat (xlator_t *this, uuid_t gfid, const char *real_path, - struct iatt *iatt); +int posix_fdstat (xlator_t *this, inode_t *inode, int fd, struct iatt *stbuf_p); +int posix_istat (xlator_t *this, inode_t *inode, uuid_t gfid, + const char *basename, struct iatt *iatt); +int posix_pstat (xlator_t *this, inode_t *inode, uuid_t gfid, + const char *real_path, struct iatt *iatt, + gf_boolean_t inode_locked); dict_t *posix_xattr_fill (xlator_t *this, const char *path, loc_t *loc, fd_t *fd, int fdnum, dict_t *xattr, struct iatt *buf); int posix_handle_pair (xlator_t *this, const char *real_path, char *key, -- cgit