From: Bob Liu <bob.liu@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: david.vrabel@citrix.com, linux-kernel@vger.kernel.org,
roger.pau@citrix.com, konrad.wilk@oracle.com,
Bob Liu <bob.liu@oracle.com>
Subject: [PATCH v2 2/3] xen-blkfront: don't add indirect pages to list when !feature_persistent
Date: Wed, 22 Jul 2015 14:40:09 +0800 [thread overview]
Message-ID: <1437547210-32573-2-git-send-email-bob.liu@oracle.com> (raw)
In-Reply-To: <1437547210-32573-1-git-send-email-bob.liu@oracle.com>
We should consider info->feature_persistent when adding indriect page to list
info->indirect_pages, else the BUG_ON() in blkif_free() would be triggered.
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
drivers/block/xen-blkfront.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 3b193cf..5dd591d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1125,8 +1125,10 @@ static void blkif_completion(struct blk_shadow *s, struct blkfront_info *info,
* Add the used indirect page back to the list of
* available pages for indirect grefs.
*/
- indirect_page = pfn_to_page(s->indirect_grants[i]->pfn);
- list_add(&indirect_page->lru, &info->indirect_pages);
+ if (!info->feature_persistent) {
+ indirect_page = pfn_to_page(s->indirect_grants[i]->pfn);
+ list_add(&indirect_page->lru, &info->indirect_pages);
+ }
s->indirect_grants[i]->gref = GRANT_INVALID_REF;
list_add_tail(&s->indirect_grants[i]->node, &info->grants);
}
--
1.7.10.4
next prev parent reply other threads:[~2015-07-22 6:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 6:40 [PATCH v2 1/3] xen-blkfront: introduce blkfront_gather_backend_features() Bob Liu
2015-07-22 6:40 ` Bob Liu [this message]
2015-07-23 8:59 ` [PATCH v2 2/3] xen-blkfront: don't add indirect pages to list when !feature_persistent Roger Pau Monné
2015-07-22 6:40 ` [PATCH v2] xen-blkback: replace work_pending with work_busy in purge_persistent_gnt() Bob Liu
2015-07-23 9:06 ` Roger Pau Monné
2015-07-24 13:10 ` Konrad Rzeszutek Wilk
2015-07-23 9:00 ` [PATCH v2 1/3] xen-blkfront: introduce blkfront_gather_backend_features() Roger Pau Monné
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=1437547210-32573-2-git-send-email-bob.liu@oracle.com \
--to=bob.liu@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®