diff options
author | Kotresh HR <khiremat@redhat.com> | 2018-04-02 08:31:25 -0400 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-05-06 07:09:08 +0530 |
commit | f8fe0771f0b450713595a7d298ed5a758cf2ce3e (patch) | |
tree | 8066610f5d3343c5f71b52c9159a701e7450c7a3 /xlators/storage/posix/src/posix.h | |
parent | 9a854a98af69c1b7e06aa01dff7ea3271ebd574c (diff) |
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 <rkavunga@redhat.com>
Updates: #208
Change-Id: I1a8d74d1e251f1d6d142f066fc99258025c0bcdd
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.h')
-rw-r--r-- | xlators/storage/posix/src/posix.h | 8 |
1 files changed, 6 insertions, 2 deletions
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, |