diff options
author | Raghavendra G <raghavendra@gluster.com> | 2011-09-27 01:20:21 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-28 10:40:41 -0700 |
commit | 243f02a5ef77d69fa91c18092d5da8578bb8f042 (patch) | |
tree | 077989a974e9d49ac8466bde4e13e2124b61e5e2 /xlators/performance/quick-read/src/quick-read.h | |
parent | bfb6366bd2a6de4cb5322dda72fbc1e6ad1edc41 (diff) |
performance/quick-read: make unlink aware of open-behind behaviour of quick-read.
quick-read should do an open of all the fds that are waiting for to be
opened behind before doing an unlink on a path.
Change-Id: I4c8d65c0511e8a37765ff57e30d99dd89b56c4fc
BUG: 765363
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/506
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/performance/quick-read/src/quick-read.h')
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.h | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.h b/xlators/performance/quick-read/src/quick-read.h index 064151b634e..95bd62eda45 100644 --- a/xlators/performance/quick-read/src/quick-read.h +++ b/xlators/performance/quick-read/src/quick-read.h @@ -52,21 +52,34 @@ struct qr_fd_ctx { int wbflags; struct list_head waiting_ops; gf_lock_t lock; + struct list_head inode_list; + struct list_head tmp_list; + fd_t *fd; }; typedef struct qr_fd_ctx qr_fd_ctx_t; struct qr_local { - char is_open; - char *path; - char just_validated; - fd_t *fd; - int open_flags; - int32_t op_ret; - int32_t op_errno; - call_stub_t *stub; + char is_open; + char *path; + char just_validated; + fd_t *fd; + int open_flags; + int32_t op_ret; + int32_t op_errno; + uint32_t open_count; + call_stub_t *stub; + struct list_head fd_list; + gf_lock_t lock; }; typedef struct qr_local qr_local_t; +struct qr_dentry { + char *name; + uuid_t pargfid; + struct list_head unlink_list; +}; +typedef struct qr_dentry qr_dentry_t; + struct qr_inode { dict_t *xattr; inode_t *inode; @@ -74,6 +87,8 @@ struct qr_inode { struct iatt stbuf; struct timeval tv; struct list_head lru; + struct list_head fd_list; + struct list_head unlinked_dentries; }; typedef struct qr_inode qr_inode_t; @@ -103,6 +118,7 @@ typedef struct qr_inode_table qr_inode_table_t; struct qr_private { qr_conf_t conf; qr_inode_table_t table; + struct mem_pool *dentry_pool; }; typedef struct qr_private qr_private_t; |