From patchwork Fri Jul 15 09:31:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bob Liu X-Patchwork-Id: 9231453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD5EB6075D for ; Fri, 15 Jul 2016 09:34:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD0E727FB7 for ; Fri, 15 Jul 2016 09:34:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A169A28325; Fri, 15 Jul 2016 09:34:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8398327FB7 for ; Fri, 15 Jul 2016 09:34:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNzTr-0003Mu-85; Fri, 15 Jul 2016 09:32:23 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNzTq-0003MN-Aj for xen-devel@lists.xenproject.org; Fri, 15 Jul 2016 09:32:22 +0000 Received: from [193.109.254.147] by server-5.bemta-14.messagelabs.com id 9C/A8-08132-5ADA8875; Fri, 15 Jul 2016 09:32:21 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKLMWRWlGSWpSXmKPExsXSO6nOVXfJ2o5 wg85VOhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8ab+9tYClo4K24suMDcwPiVvYuRi0NIoINJ 4sq6djYI5wujxIrtN1ghnI2MEguebGSBcHoZJZoOPQUq4+BgE1CSmH8/vYuRk0NEQEFic+8zs AZmgXZGibdNn9lAEsICiRJ/LmxiB7FZBFQlultugsV5BZwkTvRMYAWxJQQUJbqfTWCDsI0l+m b1sUxg5FnAyLCKUaM4tagstUjXyEQvqSgzPaMkNzEzR9fQ0EQvN7W4ODE9NScxqVgvOT93EyP Q+/UMDIw7GH9e8jvEKMnBpCTKuzGlI1yILyk/pTIjsTgjvqg0J7X4EKMMB4eSBG/2GqCcYFFq empFWmYOMAxh0hIcPEoivFKrgdK8xQWJucWZ6RCpU4yKUuK8cSB9AiCJjNI8uDZY6F9ilJUS5 mVkYGAQ4ilILcrNLEGVf8UozsGoJMxrDzKFJzOvBG76K6DFTECLrc3bQRaXJCKkpBoYY+dM/9 nl4L5lx/+JX0RezrINO+PptJtVSMSKhc8q4ZnQe+E4c9NXuedaC91VAthVTiWeq7PNl/FZ0LF AMSnz3nMJybjWggZHmUt28w+lHFmWpJKY8NtT/L9rCu//84s75jPlJf/x6P06oWv9v9MSD2ds lFhYpP3Ek9s4d92atfGWDrv0twQqsRRnJBpqMRcVJwIAavl5dHgCAAA= X-Env-Sender: bob.liu@oracle.com X-Msg-Ref: server-11.tower-27.messagelabs.com!1468575138!45487932!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28668 invoked from network); 15 Jul 2016 09:32:20 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-11.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Jul 2016 09:32:20 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6F9WEKh023254 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Jul 2016 09:32:14 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6F9WDu7024813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 15 Jul 2016 09:32:14 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u6F9WCqK005408; Fri, 15 Jul 2016 09:32:13 GMT Received: from boliuliu.jp.oracle.com (/10.191.13.27) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 15 Jul 2016 02:32:12 -0700 From: Bob Liu To: linux-kernel@vger.kernel.org Date: Fri, 15 Jul 2016 17:31:47 +0800 Message-Id: <1468575109-12209-1-git-send-email-bob.liu@oracle.com> X-Mailer: git-send-email 1.7.10.4 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: jgross@suse.com, xen-devel@lists.xenproject.org, Bob Liu , roger.pau@citrix.com Subject: [Xen-devel] [PATCH 1/3] xen-blkfront: fix places not updated after introducing 64KB page granularity X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 fcc5b4e..032fc94 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1321,7 +1321,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); for (r_index = 0; r_index < info->nr_rings; r_index++) { struct blkfront_ring_info *rinfo = &info->rinfo[r_index];