summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/fd.c4
-rw-r--r--libglusterfs/src/fd.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index 7377b1e30bd..688357327c0 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -309,8 +309,7 @@ gf_fd_put (fdtable_t *fdtable, int32_t fd)
fd_t *fdptr = NULL;
fdentry_t *fde = NULL;
- if (fd == -2)
- /* anonymous fd */
+ if (fd == GF_ANON_FD_NO)
return;
if (fdtable == NULL || fd < 0) {
@@ -774,6 +773,7 @@ __fd_anonymous (inode_t *inode)
return NULL;
fd->anonymous = _gf_true;
+ fd->flags = GF_ANON_FD_FLAGS;
__fd_bind (fd);
diff --git a/libglusterfs/src/fd.h b/libglusterfs/src/fd.h
index 5a98ec38ca7..53ec93dec6c 100644
--- a/libglusterfs/src/fd.h
+++ b/libglusterfs/src/fd.h
@@ -20,6 +20,7 @@
#include "common-utils.h"
#define GF_ANON_FD_NO -2
+#define GF_ANON_FD_FLAGS (O_RDWR|O_LARGEFILE)
struct _inode;
struct _dict;
@@ -47,7 +48,9 @@ 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 */
+ gf_boolean_t anonymous; /* fd which does not have counterpart open
+ fd on backend (server for client, posix
+ for server). */
};
typedef struct _fd fd_t;