Zhenzhong Duan
2012-Sep-19 03:07 UTC
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 <zhenzhong.duan@oracle.com> --- diff -r d1c3375c3f11 xen/common/tmem.c --- a/xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 +++ b/xen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 @@ -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
2012-Sep-19 15:20 UTC
Re: Bump tmem pool version to 1 to fix restore issue when tmem enabled
> From: Zhenzhong Duan > Sent: Tuesday, September 18, 2012 9:07 PM > To: xen-devel@lists.xen.org > Cc: Konrad Wilk; Dan Magenheimer; Feng Jin; JBeulich@suse.com > Subject: 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 <zhenzhong.duan@oracle.com>Thanks zduan! I think this fix makes tmem fully functional again on xen-unstable. Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>> --- > diff -r d1c3375c3f11 xen/common/tmem.c > --- a/xen/common/tmem.c Mon Sep 17 21:12:21 2012 +0100 > +++ b/xen/common/tmem.c Wed Sep 19 10:28:05 2012 +0800 > @@ -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 ) >