xen-blkfront: fix places not updated after introducing 64KB page granularity
authorBob Liu <bob.liu@oracle.com>
Fri, 1 Jul 2016 19:45:57 +0000 (15:45 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 19 Aug 2016 16:31:58 +0000 (12:31 -0400)
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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c

index be4fea6a5dd33695df30f87a1fea5341eadbd709..6a1756d72dcb29bb45195824a006a18588dcc658 100644 (file)
@@ -1315,7 +1315,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)
@@ -2008,7 +2008,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);
 
        for (r_index = 0; r_index < info->nr_rings; r_index++) {
                struct blkfront_ring_info *rinfo = &info->rinfo[r_index];
This page took 0.027255 seconds and 5 git commands to generate.