summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read/src/quick-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/quick-read/src/quick-read.c')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 15d4b6378dd..6be668a7a66 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -569,6 +569,8 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unwind;
}
+ local->just_validated = 1;
+
if (op_ret == -1) {
goto unwind;
}
@@ -599,11 +601,8 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
UNLOCK (&qr_file->lock);
- frame->local = NULL;
-
call_resume (local->stub);
- GF_FREE (local);
return 0;
unwind:
@@ -782,10 +781,18 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t start = 0, end = 0;
size_t len = 0;
struct iobuf_pool *iobuf_pool = NULL;
+ qr_local_t *local = NULL;
+ char just_validated = 0;
op_ret = 0;
conf = this->private;
+ local = frame->local;
+
+ if (local != NULL) {
+ just_validated = local->just_validated;
+ }
+
ret = fd_ctx_get (fd, this, &value);
if (ret == 0) {
qr_fd_ctx = (qr_fd_ctx_t *)(long) value;
@@ -805,7 +812,8 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
LOCK (&file->lock);
{
if (file->xattr){
- if (qr_need_validation (conf,file)) {
+ if (!just_validated &&
+ qr_need_validation (conf,file)) {
need_validation = 1;
goto unlock;
}