Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
Mohan Srinivasan authored
Showing with 12 additions and 6 deletions.
  1. +0 −3  src/flashcache.h
  2. +12 −3 src/flashcache_conf.c
View
3  src/flashcache.h
@@ -529,9 +529,6 @@ int flashcache_ctr(struct dm_target *ti, unsigned int argc,
char **argv);
void flashcache_dtr(struct dm_target *ti);
-int flashcache_status(struct dm_target *ti, status_type_t type,
- char *result, unsigned int maxlen);
-
struct kcached_job *flashcache_alloc_cache_job(void);
void flashcache_free_cache_job(struct kcached_job *job);
struct pending_job *flashcache_alloc_pending_job(struct cache_c *dmc);
View
15 src/flashcache_conf.c
@@ -1088,8 +1088,11 @@ flashcache_ctr(struct dm_target *ti, unsigned int argc, char **argv)
dmc->sync_index = 0;
dmc->clean_inprog = 0;
-
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)
ti->split_io = dmc->block_size;
+#else
+ ti->max_io_len = dmc->block_size;
+#endif
ti->private = dmc;
/* Cleaning Thresholds */
@@ -1511,9 +1514,15 @@ flashcache_status_table(struct cache_c *dmc, status_type_t type,
* Output cache stats upon request of device status;
* Output cache configuration upon request of table status.
*/
-int
+int
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
flashcache_status(struct dm_target *ti, status_type_t type,
- char *result, unsigned int maxlen)
+ unsigned int unused_status_flags,
+ char *result, unsigned int maxlen)
+#else
+flashcache_status(struct dm_target *ti, status_type_t type,
+ char *result, unsigned int maxlen)
+#endif
{
struct cache_c *dmc = (struct cache_c *) ti->private;

0 comments on commit a4a63a7

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