Skip to content
This repository
Browse code

Change to make flashcache compile on 3.6.0.

Summary: Changes to make flashcache compile on 3.6.0. Thanks to
Thomas Stein for quickly verifying that the patch works.

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
  • Loading branch information...
commit a4a63a71c6f84e0768d44bf3683f4f6941197120 1 parent f3d1439
authored October 09, 2012
3  src/flashcache.h
@@ -529,9 +529,6 @@ int flashcache_ctr(struct dm_target *ti, unsigned int argc,
529 529
 		   char **argv);
530 530
 void flashcache_dtr(struct dm_target *ti);
531 531
 
532  
-int flashcache_status(struct dm_target *ti, status_type_t type,
533  
-		      char *result, unsigned int maxlen);
534  
-
535 532
 struct kcached_job *flashcache_alloc_cache_job(void);
536 533
 void flashcache_free_cache_job(struct kcached_job *job);
537 534
 struct pending_job *flashcache_alloc_pending_job(struct cache_c *dmc);
15  src/flashcache_conf.c
@@ -1088,8 +1088,11 @@ flashcache_ctr(struct dm_target *ti, unsigned int argc, char **argv)
1088 1088
 
1089 1089
 	dmc->sync_index = 0;
1090 1090
 	dmc->clean_inprog = 0;
1091  
-
  1091
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
1092 1092
 	ti->split_io = dmc->block_size;
  1093
+#else
  1094
+	ti->max_io_len = dmc->block_size;
  1095
+#endif
1093 1096
 	ti->private = dmc;
1094 1097
 
1095 1098
 	/* Cleaning Thresholds */
@@ -1511,9 +1514,15 @@ flashcache_status_table(struct cache_c *dmc, status_type_t type,
1511 1514
  *  Output cache stats upon request of device status;
1512 1515
  *  Output cache configuration upon request of table status.
1513 1516
  */
1514  
-int 
  1517
+int
  1518
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
1515 1519
 flashcache_status(struct dm_target *ti, status_type_t type,
1516  
-	     char *result, unsigned int maxlen)
  1520
+		  unsigned int unused_status_flags,
  1521
+		  char *result, unsigned int maxlen)
  1522
+#else
  1523
+flashcache_status(struct dm_target *ti, status_type_t type,
  1524
+		  char *result, unsigned int maxlen)
  1525
+#endif
1517 1526
 {
1518 1527
 	struct cache_c *dmc = (struct cache_c *) ti->private;
1519 1528
 	

0 notes on commit a4a63a7

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