Browse files

Fix for a crash for the (fallow_cleaning && LRU_reclaim) case.

Summary: Fix for a copy-paste bug, which can cause crashes when fallow cleaning is enabled in
conjunction with LRU reclamation. Found by Vyacheslav Maslow and Wang Ning. This bug was also
fixed a long time ago (but not committed) by Kumar Sundararajan (facebook).

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
  • Loading branch information...
1 parent 67a11d7 commit 60a143e4686f5a176e40dee178ed4cc1ceb7c2ba Mohan Srinivasan committed Jul 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/flashcache_main.c
View
2 src/flashcache_main.c
@@ -1170,7 +1170,7 @@ flashcache_clean_set(struct cache_c *dmc, int set)
cacheblk = &dmc->cache[lru_rel_index + start_index];
if ((cacheblk->cache_state & (DIRTY | BLOCK_IO_INPROG)) == DIRTY) {
cacheblk->cache_state |= DISKWRITEINPROG;
- flashcache_clear_fallow(dmc, i);
+ flashcache_clear_fallow(dmc, lru_rel_index + start_index);
writes_list[nr_writes].dbn = cacheblk->dbn;
writes_list[nr_writes].index = cacheblk - &dmc->cache[0];
nr_writes++;

0 comments on commit 60a143e

Please sign in to comment.