diff options
author | Raghavendra G <raghavendra@gluster.com> | 2012-03-20 16:48:18 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-20 09:48:58 -0700 |
commit | dbae3d58d7dbfb404211866a17da1559cdde3387 (patch) | |
tree | e64f873ae288e9ef7ad19b3b94cec21d71b35235 /xlators/performance | |
parent | e8f9aabb782d4e97b1c2a6df379128c3f3962401 (diff) |
performance/io-cache: destroy the pages which survived in
__ioc_page_destroy because of non NULL waitq in ioc_fault_cbk.
Change-Id: I00b83f8bf0a654b3a3a23cf0b25657fbfda17804
BUG: 767948
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.com/2981
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.h | 1 | ||||
-rw-r--r-- | xlators/performance/io-cache/src/page.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h index 1ce4e90325a..c3c631dbace 100644 --- a/xlators/performance/io-cache/src/io-cache.h +++ b/xlators/performance/io-cache/src/io-cache.h @@ -127,6 +127,7 @@ struct ioc_page { struct iobref *iobref; pthread_mutex_t page_lock; int32_t op_errno; + char stale; }; struct ioc_cache { diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c index a809a80fd05..50357199f44 100644 --- a/xlators/performance/io-cache/src/page.c +++ b/xlators/performance/io-cache/src/page.c @@ -111,6 +111,7 @@ __ioc_page_destroy (ioc_page_t *page) if (page->waitq) { /* frames waiting on this page, do not destroy this page */ page_size = -1; + page->stale = 1; } else { rbthash_remove (page->inode->cache.page_table, &page->offset, sizeof (page->offset)); @@ -956,6 +957,10 @@ __ioc_page_wakeup (ioc_page_t *page, int32_t op_errno) } } + if (page->stale) { + __ioc_page_destroy (page); + } + out: return waitq; } |