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-metadata.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-metadata.h')
-rw-r--r-- | xlators/storage/posix/src/posix-metadata.h | 13 |
1 files changed, 8 insertions, 5 deletions
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(); |