From 15adea873a10217b6083e1062b244f29dc6a51e6 Mon Sep 17 00:00:00 2001 From: Mohan Srinivasan Date: Mon, 4 Oct 2010 11:18:53 -0700 Subject: [PATCH] flashcache-wt ported to 2.6.34. Patch submitted by Hajime Taira (Redhat). htaira at redhat dot com --- flashcache-wt/src/flashcache_wt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/flashcache-wt/src/flashcache_wt.c b/flashcache-wt/src/flashcache_wt.c index e562cd3..591f0ad 100644 --- a/flashcache-wt/src/flashcache_wt.c +++ b/flashcache-wt/src/flashcache_wt.c @@ -920,15 +920,25 @@ static int cache_ctr(struct dm_target *ti, unsigned int argc, char **argv) dmc->tgt = ti; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) r = dm_get_device(ti, argv[0], 0, ti->len, dm_table_get_mode(ti->table), &dmc->disk_dev); +#else + r = dm_get_device(ti, argv[0], + dm_table_get_mode(ti->table), &dmc->disk_dev); +#endif if (r) { ti->error = "flashcache-wt: Source device lookup failed"; goto bad1; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34) r = dm_get_device(ti, argv[1], 0, 0, dm_table_get_mode(ti->table), &dmc->cache_dev); +#else + r = dm_get_device(ti, argv[1], + dm_table_get_mode(ti->table), &dmc->cache_dev); +#endif if (r) { ti->error = "flashcache-wt: Cache device lookup failed"; goto bad2; @@ -1272,6 +1282,9 @@ flashcache_wt_init(void) if (r < 0) { DMERR("cache: register failed %d", r); } + + printk("flashcache-wt: %s initialized\n", flashcache_wt_sw_version); + #ifdef CONFIG_PROC_FS { struct proc_dir_entry *entry;