From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] gnttab: propagate Reserved flag from old to new page in gnttab_copy_grant_page. Date: Tue, 23 Feb 2010 17:08:16 +0000 Message-ID: <1266944896.11737.6496.camel@zakaz.uk.xensource.com> References: <1266943189.11737.6457.camel@zakaz.uk.xensource.com> <1266943218-16666-1-git-send-email-ian.campbell@citrix.com> <4B8418A60200007800030C5F@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4B8418A60200007800030C5F@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: Fitzhardinge , "xen-devel@lists.xensource.com" , Jeremy List-Id: xen-devel@lists.xenproject.org On Tue, 2010-02-23 at 17:04 +0000, Jan Beulich wrote: > >>> Ian Campbell 23.02.10 17:40 >>> > >--- a/drivers/xen/grant-table.c > >+++ b/drivers/xen/grant-table.c > >@@ -558,9 +558,12 @@ int gnttab_copy_grant_page(grant_ref_t ref, struct page **pagep) > > new_page->mapping = page->mapping; > > new_page->index = page->index; > > set_bit(PG_foreign, &new_page->flags); > >+ if (PageReserved(page)) > >+ set_bit(PG_reserved, &new_page->flags); > > Why not SetPageReserved()? I was just following the pattern above with PG_foreign. I guess that is subtly different since either mapping or index (I forget which) would need to be the second argument to SetPageForeign (probably an accessor is required for that dtor field). This function is grubbing around at a low level with many of the struct page fields -- I guess doing it this way makes it a little more obvious that something subtle is going on but I'm not fussed about changing it. I'll follow up with something which fixes this up for both reserved and foreign. Ian.