All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: Fitzhardinge <jeremy@goop.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jeremy
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	[thread overview]
Message-ID: <1266944896.11737.6496.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <4B8418A60200007800030C5F@vpn.id2.novell.com>

On Tue, 2010-02-23 at 17:04 +0000, Jan Beulich wrote:
> >>> Ian Campbell <ian.campbell@citrix.com> 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.

  reply	other threads:[~2010-02-23 17:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 16:39 [GIT] Grant table fix Ian Campbell
2010-02-23 16:40 ` [PATCH] gnttab: propagate Reserved flag from old to new page in gnttab_copy_grant_page Ian Campbell
2010-02-23 17:04   ` Jan Beulich
2010-02-23 17:08     ` Ian Campbell [this message]
2010-02-23 17:24       ` [PATCH] grant-table: use page flag interfaces when copying a grant page Ian Campbell
2010-02-23 17:25         ` Ian Campbell
2010-02-23 18:02 ` [GIT] Grant table fix Jeremy Fitzhardinge
2010-02-23 18:05   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1266944896.11737.6496.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@novell.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.