diff options
-rw-r--r-- | xlators/performance/read-ahead/src/page.c | 3 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 8 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.h | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c index 1e6a92087..52b3fdaf3 100644 --- a/xlators/performance/read-ahead/src/page.c +++ b/xlators/performance/read-ahead/src/page.c @@ -508,6 +508,9 @@ ra_page_wakeup (ra_page_t *page) ra_frame_fill (page, frame); } + if (page->stale) { + ra_page_purge (page); + } out: return waitq; } diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index f7f16115b..718bf3398 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -248,8 +248,12 @@ flush_region (call_frame_t *frame, ra_file_t *file, off_t offset, off_t size, if (!trav->waitq) { ra_page_purge (trav); } - else if (for_write) { - trav->poisoned = 1; + else { + trav->stale = 1; + + if (for_write) { + trav->poisoned = 1; + } } } trav = next; diff --git a/xlators/performance/read-ahead/src/read-ahead.h b/xlators/performance/read-ahead/src/read-ahead.h index f5e73cb66..4102a052d 100644 --- a/xlators/performance/read-ahead/src/read-ahead.h +++ b/xlators/performance/read-ahead/src/read-ahead.h @@ -85,6 +85,7 @@ struct ra_page { size_t size; struct ra_waitq *waitq; struct iobref *iobref; + char stale; }; |