diff options
| author | Anand Avati <avati@gluster.com> | 2009-11-13 02:58:58 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-13 02:13:25 -0800 | 
| commit | f9bb9dee5f92d50c4e87995680198e488a4f50ce (patch) | |
| tree | ebee8b10c88f6192844e5254dbdac134cc406d70 /xlators/protocol/client/src/client-protocol.h | |
| parent | 590e5879f819018aee63b800b0f66fd6ff49641d (diff) | |
protoocl/client: file directory reopen support
reopen files and directories which were open before a disconnection after
reconnecting. operations on files/directories which could not be opened
continue to return EBADFD
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 170 (Auto-heal fails on files that are open()-ed/mmap()-ed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=170
Diffstat (limited to 'xlators/protocol/client/src/client-protocol.h')
| -rw-r--r-- | xlators/protocol/client/src/client-protocol.h | 23 | 
1 files changed, 14 insertions, 9 deletions
diff --git a/xlators/protocol/client/src/client-protocol.h b/xlators/protocol/client/src/client-protocol.h index 779711b1004..8801d530bb9 100644 --- a/xlators/protocol/client/src/client-protocol.h +++ b/xlators/protocol/client/src/client-protocol.h @@ -30,6 +30,7 @@  #include "inode.h"  #include "timer.h"  #include "byte-order.h" +#include "saved-frames.h"  #define CLIENT_PORT_CEILING        1023 @@ -65,15 +66,17 @@ typedef struct client_connection client_connection_t;  #include "protocol.h"  typedef struct _client_fd_ctx { -        int               remote_fd;          struct list_head  sfd_pos;      /*  Stores the reference to this                                              fd's position in the saved_fds list.                                          */ -        fd_t              *fd;          /* Reverse reference to the fd itself. -                                           This is needed to delete this fdctx -                                           from the fd's context in -                                           protocol_client_mark_fd_bad. -                                        */ +        int64_t           remote_fd; +        inode_t          *inode; +        uint64_t          ino; +        uint64_t          gen; +        char              is_dir; +        char              released; +        int32_t           flags; +        int32_t           wbflags;  } client_fd_ctx_t;  struct _client_conf { @@ -103,9 +106,11 @@ struct client_connection {  };  typedef struct { -	loc_t loc; -	loc_t loc2; -	fd_t *fd; +	loc_t              loc; +	loc_t              loc2; +	fd_t              *fd; +        gf_op_t            op; +        client_fd_ctx_t   *fdctx;  } client_local_t;  | 
