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.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 9712b675eb1..b5172a26c24 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -265,6 +265,7 @@ struct posix_private { }; typedef struct { + call_frame_t *frame; xlator_t *this; const char *real_path; dict_t *xattr; @@ -337,8 +338,9 @@ 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, data_t *value, int flags, struct iatt *stbuf); -int posix_fhandle_pair (xlator_t *this, int fd, char *key, data_t *value, - int flags, struct iatt *stbuf); +int posix_fhandle_pair (call_frame_t *frame, xlator_t *this, int fd, char *key, + data_t *value, int flags, struct iatt *stbuf, + fd_t *_fd); void posix_spawn_janitor_thread (xlator_t *this); int posix_get_file_contents (xlator_t *this, uuid_t pargfid, const char *name, char **contents); @@ -368,6 +370,8 @@ posix_get_ancestry (xlator_t *this, inode_t *leaf_inode, gf_dirent_t *head, char **path, int type, int32_t *op_errno, dict_t *xdata); int +posix_handle_mdata_xattr (call_frame_t *frame, const char *name, int *op_errno); +int posix_handle_georep_xattrs (call_frame_t *, const char *, int *, gf_boolean_t); int32_t posix_resolve_dirgfid_to_path (const uuid_t dirgfid, const char *brick_path, -- cgit