Skip to content
This repository
Browse code

If the SSD is dead, bypass *all* IOs to disk in the writerthrough and…

… writearound modes.

Patch submitted by Arne Wiebalck.

Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
  • Loading branch information...
commit f3d1439ba87189dc7e4479f64569878e1d3e5674 1 parent 9cb6e3a
authored November 03, 2012

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  src/flashcache_main.c
3  src/flashcache_main.c
@@ -1778,7 +1778,8 @@ flashcache_map(struct dm_target *ti, struct bio *bio,
1778 1778
 	if (unlikely(dmc->sysctl_pid_do_expiry && 
1779 1779
 		     (dmc->whitelist_head || dmc->blacklist_head)))
1780 1780
 		flashcache_pid_expiry_all_locked(dmc);
1781  
-	if ((to_sector(bio->bi_size) != dmc->block_size) ||
  1781
+	if (unlikely(dmc->bypass_cache) ||
  1782
+	    (to_sector(bio->bi_size) != dmc->block_size) ||
1782 1783
 	    (bio_data_dir(bio) == WRITE && 
1783 1784
 	     (dmc->cache_mode == FLASHCACHE_WRITE_AROUND || flashcache_uncacheable(dmc, bio)))) {
1784 1785
 		queued = flashcache_inval_blocks(dmc, bio);

0 notes on commit f3d1439

Please sign in to comment.
Something went wrong with that request. Please try again.