diff options
Diffstat (limited to 'libglusterfs/src/fd.h')
| -rw-r--r-- | libglusterfs/src/fd.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h index 42df22b95..c1b9157d8 100644 --- a/libglusterfs/src/fd.h +++ b/libglusterfs/src/fd.h @@ -22,6 +22,9 @@ #include "glusterfs.h" #include "locking.h" #include "fd-lk.h" +#include "common-utils.h" + +#define GF_ANON_FD_NO -2 struct _inode; struct _dict; @@ -38,12 +41,8 @@ struct _fd_ctx { }; }; -/* If this structure changes, please have mercy on the booster maintainer - * and update the fd_t struct in booster/src/booster-fd.h. - * See the comment there to know why. - */ struct _fd { - uint64_t pid; + uint64_t pid; int32_t flags; int32_t refcount; struct list_head inode_list; @@ -53,6 +52,7 @@ struct _fd { struct _fd_ctx *_ctx; int xl_count; /* Number of xl referred in this fd */ struct fd_lk_ctx *lk_ctx; + gf_boolean_t anonymous; /* geo-rep anonymous fd */ }; typedef struct _fd fd_t; @@ -86,7 +86,7 @@ typedef struct _fdtable fdtable_t; #include "xlator.h" -inline void +void gf_fd_put (fdtable_t *fdtable, int32_t fd); @@ -118,10 +118,6 @@ fd_t * fd_ref (fd_t *fd); -fd_t * -__fd_unref (fd_t *fd); - - void fd_unref (fd_t *fd); @@ -138,6 +134,9 @@ fd_lookup (struct _inode *inode, pid_t pid); fd_t * fd_lookup_uint64 (struct _inode *inode, uint64_t pid); +fd_t* +fd_lookup_anonymous (inode_t *inode); + fd_t * fd_anonymous (inode_t *inode); @@ -153,8 +152,6 @@ fd_list_empty (struct _inode *inode); fd_t * fd_bind (fd_t *fd); -fd_t * -__fd_bind (fd_t *fd); int fd_ctx_set (fd_t *fd, xlator_t *xlator, uint64_t value); @@ -167,20 +164,17 @@ fd_ctx_get (fd_t *fd, xlator_t *xlator, uint64_t *value); int fd_ctx_del (fd_t *fd, xlator_t *xlator, uint64_t *value); - int -__fd_ctx_set (fd_t *fd, xlator_t *xlator, uint64_t value); +__fd_ctx_del (fd_t *fd, xlator_t *xlator, uint64_t *value); int -__fd_ctx_get (fd_t *fd, xlator_t *xlator, uint64_t *value); +__fd_ctx_set (fd_t *fd, xlator_t *xlator, uint64_t value); int -__fd_ctx_del (fd_t *fd, xlator_t *xlator, uint64_t *value); +__fd_ctx_get (fd_t *fd, xlator_t *xlator, uint64_t *value); -fd_t * -__fd_ref (fd_t *fd); void fd_ctx_dump (fd_t *fd, char *prefix); @@ -188,8 +182,6 @@ fd_ctx_dump (fd_t *fd, char *prefix); fdentry_t * gf_fd_fdtable_copy_all_fds (fdtable_t *fdtable, uint32_t *count); -fdentry_t * -__gf_fd_fdtable_copy_all_fds (fdtable_t *fdtable, uint32_t *count); void gf_fdptr_put (fdtable_t *fdtable, fd_t *fd); |
