From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753974AbcG1JCm (ORCPT ); Thu, 28 Jul 2016 05:02:42 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:18264 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbcG1JCP (ORCPT ); Thu, 28 Jul 2016 05:02:15 -0400 From: Bob Liu To: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org, konrad.wilk@oracle.com, roger.pau@citrix.com, Bob Liu Subject: [PATCH v2 1/3] xen-blkfront: fix places not updated after introducing 64KB page granularity Date: Thu, 28 Jul 2016 17:01:42 +0800 Message-Id: <1469696505-30833-1-git-send-email-bob.liu@oracle.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Two places didn't get updated when 64KB page granularity was introduced, this patch fix them. Signed-off-by: Bob Liu Acked-by: Roger Pau Monné --- 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