From 243f02a5ef77d69fa91c18092d5da8578bb8f042 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Tue, 27 Sep 2011 01:20:21 +0530 Subject: 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 Reviewed-on: http://review.gluster.com/506 Tested-by: Gluster Build System Reviewed-by: Shishir Gowda Reviewed-by: Vijay Bellur --- xlators/performance/quick-read/src/quick-read.h | 32 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'xlators/performance/quick-read/src/quick-read.h') 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; -- cgit