Skip to content

Commit

Permalink
Fix for a crash for the (fallow_cleaning && LRU_reclaim) case.
Browse files Browse the repository at this point in the history
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
Mohan Srinivasan committed Jul 9, 2012
1 parent 67a11d7 commit 60a143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flashcache_main.c
Expand Up @@ -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++;
Expand Down

0 comments on commit 60a143e

Please sign in to comment.