Debian Codegraph @

xlators/storage/posix/src/posix-metadata.h

raw symbols SCIP
1 /*
2 Copyright (c) 2018 Red Hat, Inc. <http://www.redhat.com>
3 This file is part of GlusterFS.
4
5 This file is licensed to you under your choice of the GNU Lesser
6 General Public License, version 3 or any later version (LGPLv3 or
7 later), or the GNU General Public License, version 2 (GPLv2), in all
8 cases as published by the Free Software Foundation.
9 */
10
11 #ifndef _POSIX_METADATA_H
12 #define _POSIX_METADATA_H
13
14 #include "posix-metadata-disk.h"
15
16 /* In memory representation posix metadata xattr */
17 typedef struct {
18 /* flags indicates valid fields in the structure */
19 uint64_t flags;
20 struct timespec ctime;
21 struct timespec mtime;
22 struct timespec atime;
23 /* version of structure, bumped up if any new member is added */
24 uint8_t version;
25
26 char _pad[7]; /* manual padding */
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 /* With inode lock*/
36 int
37 posix_get_mdata_xattr(xlator_t *this, const char *real_path, int _fd,
38 inode_t *inode, struct iatt *stbuf);
39 /* With out inode lock*/
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 /* _POSIX_METADATA_H */