Search
j0ke.net Open Build Service
>
Projects
>
hardware
:
flashcache
>
flashcache
> flashcache-3.1.2_issue86.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File flashcache-3.1.2_issue86.patch of Package flashcache
From a4a63a71c6f84e0768d44bf3683f4f6941197120 Mon Sep 17 00:00:00 2001 From: Mohan Srinivasan <mohan@fb.com> Date: Tue, 9 Oct 2012 12:28:52 -0700 Subject: [PATCH] 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: --- src/flashcache.h | 3 --- src/flashcache_conf.c | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/flashcache.h b/src/flashcache.h index a31b52a..f5c01bd 100644 --- a/src/flashcache.h +++ b/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); diff --git a/src/flashcache_conf.c b/src/flashcache_conf.c index e151a06..f72200e 100644 --- a/src/flashcache_conf.c +++ b/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;