diff options
author | Raghavendra G <raghavendra@zresearch.com> | 2009-07-09 00:26:00 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-07-16 00:37:44 -0700 |
commit | eaac497bfe4dd95a5d5ea34bf59c16bf946960e9 (patch) | |
tree | 8a521e9d49c0984ac33a7c1d2b1d5928c4c9b1d0 /xlators/performance/quick-read/src/quick-read.h | |
parent | 06f02a48e0632469a7fd3ab1d7b5364a0de82d91 (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.h | 18 |
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; |