summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src/quick-read.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-07-09 00:26:00 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-07-16 00:37:44 -0700
commiteaac497bfe4dd95a5d5ea34bf59c16bf946960e9 (patch)
tree8a521e9d49c0984ac33a7c1d2b1d5928c4c9b1d0 /xlators/performance/quick-read/src/quick-read.h
parent06f02a48e0632469a7fd3ab1d7b5364a0de82d91 (diff)
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 <avati@dev.gluster.com>
Diffstat (limited to 'xlators/performance/quick-read/src/quick-read.h')
-rw-r--r--xlators/performance/quick-read/src/quick-read.h18
1 files changed, 18 insertions, 0 deletions
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;