Bump tmem pool version to 1 to fix restore issue when tmem enabled
Restore fail when tmem enabled both in hypervisor and guest. This is due to spec version mismatch when restore a pool.
Signed-off-by Zhenzhong Duan <[email protected]>
---
xen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 renamed from xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 +2 -1
@@ -2397,7 +2397,8 @@ break; rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) | (pool->shared ? TMEM_POOL_SHARED : 0) | - (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT); + (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) | + (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT); break; case TMEMC_SAVE_GET_POOL_NPAGES: if ( pool == NULL )
Dan Magenheimer
Acked-byQuoted 10 lines
From: Zhenzhong Duan
Sent: Tuesday, September 18, 2012 9:07 PM
To: [email protected]
Cc: Konrad Wilk; Dan Magenheimer; Feng Jin; [email protected]
Subject: Bump tmem pool version to 1 to fix restore issue when tmem enabledRestore fail when tmem enabled both in hypervisor and guest. This is due to spec version mismatch when restore a pool.
Signed-off-by Zhenzhong Duan <[email protected]>
Thanks zduan!
I think this fix makes tmem fully functional again on xen-unstable.
Acked-by Dan Magenheimer <[email protected]>
Quoted 15 lines
---
diff -rd1c3375c3f11xen/common/tmem.cxen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 renamed from xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 +2
-1@@ -2397,7 +2397,8 @@ break; rc = (pool->persistent ? TMEM_POOL_PERSIST : 0) | (pool->shared ? TMEM_POOL_SHARED : 0) | - (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT); + (pool->pageshift << TMEM_POOL_PAGESIZE_SHIFT) | + (TMEM_SPEC_VERSION << TMEM_POOL_VERSION_SHIFT); break; case TMEMC_SAVE_GET_POOL_NPAGES: if ( pool == NULL )