| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#ifndef _POSIX_METADATA_H |
| 12 |
#define _POSIX_METADATA_H |
| 13 |
|
| 14 |
#include "posix-metadata-disk.h" |
| 15 |
|
| 16 |
|
| 17 |
typedef struct { |
| 18 |
|
| 19 |
uint64_t flags; |
| 20 |
struct timespec ctime; |
| 21 |
struct timespec mtime; |
| 22 |
struct timespec atime; |
| 23 |
|
| 24 |
uint8_t version; |
| 25 |
|
| 26 |
char _pad[7]; |
| 27 |
} posix_mdata_t; |
| 28 |
|
| 29 |
typedef struct { |
| 30 |
unsigned short ctime : 1; |
| 31 |
unsigned short mtime : 1; |
| 32 |
unsigned short atime : 1; |
| 33 |
} posix_mdata_flag_t; |
| 34 |
|
| 35 |
|
| 36 |
int |
| 37 |
posix_get_mdata_xattr(xlator_t *this, const char *real_path, int _fd, |
| 38 |
inode_t *inode, struct iatt *stbuf); |
| 39 |
|
| 40 |
int |
| 41 |
__posix_get_mdata_xattr(xlator_t *this, const char *real_path, int _fd, |
| 42 |
inode_t *inode, struct iatt *stbuf); |
| 43 |
void |
| 44 |
posix_update_utime_in_mdata(xlator_t *this, const char *real_path, int fd, |
| 45 |
inode_t *inode, struct timespec *ctime, |
| 46 |
struct iatt *stbuf, int valid); |
| 47 |
void |
| 48 |
posix_update_ctime_in_mdata(xlator_t *this, const char *real_path, int fd, |
| 49 |
inode_t *inode, struct timespec *ctime, |
| 50 |
struct iatt *stbuf, int valid); |
| 51 |
void |
| 52 |
posix_set_ctime(call_frame_t *frame, xlator_t *this, const char *real_path, |
| 53 |
int fd, inode_t *inode, struct iatt *stbuf); |
| 54 |
void |
| 55 |
posix_set_parent_ctime(call_frame_t *frame, xlator_t *this, |
| 56 |
const char *real_path, int fd, inode_t *inode, |
| 57 |
struct iatt *stbuf); |
| 58 |
void |
| 59 |
posix_set_ctime_cfr(call_frame_t *frame, xlator_t *this, |
| 60 |
const char *real_path_in, int fd_in, inode_t *inode_in, |
| 61 |
struct iatt *stbuf_in, const char *read_path_put, |
| 62 |
int fd_out, inode_t *inode_out, struct iatt *stbuf_out); |
| 63 |
int |
| 64 |
posix_set_mdata_xattr_legacy_files(xlator_t *this, inode_t *inode, |
| 65 |
const char *realpath, |
| 66 |
struct mdata_iatt *mdata_iatt, |
| 67 |
int *op_errno); |
| 68 |
void |
| 69 |
posix_mdata_iatt_from_disk(struct mdata_iatt *out, posix_mdata_disk_t *in); |
| 70 |
|
| 71 |
#endif |