From eaac497bfe4dd95a5d5ea34bf59c16bf946960e9 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Thu, 9 Jul 2009 00:26:00 +0000 Subject: quick-read: implement qr_open - The file is opened actually only if it is not cached already in lookup. This adds responsibility for fops operating on fds to make sure that a valid fd actually opened on a file is used to complete the fop. Signed-off-by: Anand V. Avati --- xlators/performance/quick-read/src/quick-read.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (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 44db762437b..32bebac4866 100644 --- a/xlators/performance/quick-read/src/quick-read.h +++ b/xlators/performance/quick-read/src/quick-read.h @@ -43,6 +43,24 @@ #define GLUSTERFS_CONTENT_KEY "glusterfs.content" +struct qr_fd_ctx { + char opened; + char open_in_transit; + char *path; + int flags; + struct list_head waiting_ops; + gf_lock_t lock; +}; +typedef struct qr_fd_ctx qr_fd_ctx_t; + +struct qr_local { + char is_open; + fd_t *fd; + int open_flags; + call_stub_t *stub; +}; +typedef struct qr_local qr_local_t; + struct qr_file { dict_t *xattr; struct stat stbuf; -- cgit