Skip to content

Commit

Permalink
The execution time at fast_remove was made fast.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishibashi committed Oct 5, 2011
1 parent 93eb664 commit 95bc266
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/flashcache_conf.c
Expand Up @@ -1566,19 +1566,19 @@ flashcache_sync_for_remove(struct cache_c *dmc)
dmc->max_clean_ios_total = 20;
dmc->max_clean_ios_set = 10;
flashcache_sync_all(dmc);
/*
* We've prevented new cleanings from starting (for the fast remove case)
* and we will wait for all in progress cleanings to exit.
* Wait a few seconds for everything to quiesce before writing out the
* cache metadata.
*/
msleep(FLASHCACHE_SYNC_REMOVE_DELAY);
} else {
/* Needed to abort any in-progress cleanings, leave blocks DIRTY */
atomic_set(&dmc->remove_in_prog, FAST_REMOVE);
printk(KERN_ALERT "Fast flashcache remove Skipping cleaning of %d blocks",
dmc->nr_dirty);
}
/*
* We've prevented new cleanings from starting (for the fast remove case)
* and we will wait for all in progress cleanings to exit.
* Wait a few seconds for everything to quiesce before writing out the
* cache metadata.
*/
msleep(FLASHCACHE_SYNC_REMOVE_DELAY);
/* Wait for all the dirty blocks to get written out, and any other IOs */
wait_event(dmc->destroyq, !atomic_read(&dmc->nr_jobs));
cancel_delayed_work(&dmc->delayed_clean);
Expand Down

0 comments on commit 95bc266

Please sign in to comment.