linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] xen-blkfront: fix places not updated after introducing 64KB page granularity
@ 2016-07-28  9:01 Bob Liu
  2016-07-28  9:01 ` [PATCH v2 2/3] xen-blkfront: introduce blkif_set_queue_limits() Bob Liu
  2016-07-28  9:01 ` [PATCH 3/3] xen-blkfront: free resources if xlvbd_alloc_gendisk fails Bob Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Bob Liu @ 2016-07-28  9:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: xen-devel, konrad.wilk, roger.pau, Bob Liu

Two places didn't get updated when 64KB page granularity was introduced,
this patch fix them.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
---
 drivers/block/xen-blkfront.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index ca0536e..36d9a0d 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1318,7 +1318,7 @@ free_shadow:
 			rinfo->ring_ref[i] = GRANT_INVALID_REF;
 		}
 	}
-	free_pages((unsigned long)rinfo->ring.sring, get_order(info->nr_ring_pages * PAGE_SIZE));
+	free_pages((unsigned long)rinfo->ring.sring, get_order(info->nr_ring_pages * XEN_PAGE_SIZE));
 	rinfo->ring.sring = NULL;
 
 	if (rinfo->irq)
@@ -2013,7 +2013,7 @@ static int blkif_recover(struct blkfront_info *info)
 
 	blkfront_gather_backend_features(info);
 	segs = info->max_indirect_segments ? : BLKIF_MAX_SEGMENTS_PER_REQUEST;
-	blk_queue_max_segments(info->rq, segs);
+	blk_queue_max_segments(info->rq, segs / GRANTS_PER_PSEG);
 	bio_list_init(&bio_list);
 	INIT_LIST_HEAD(&requests);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-28  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-28  9:01 [PATCH v2 1/3] xen-blkfront: fix places not updated after introducing 64KB page granularity Bob Liu
2016-07-28  9:01 ` [PATCH v2 2/3] xen-blkfront: introduce blkif_set_queue_limits() Bob Liu
2016-07-28  9:01 ` [PATCH 3/3] xen-blkfront: free resources if xlvbd_alloc_gendisk fails Bob Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).