Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755486AbbEUND0 (ORCPT ); Thu, 21 May 2015 09:03:26 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:37036 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbbEUNDY (ORCPT ); Thu, 21 May 2015 09:03:24 -0400 Message-ID: <555DD790.3040302@oracle.com> Date: Thu, 21 May 2015 21:03:12 +0800 From: Bob Liu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: =?windows-1252?Q?Roger_Pau_Monn=E9?= CC: xen-devel@lists.xen.org, david.vrabel@citrix.com, justing@spectralogic.com, konrad.wilk@oracle.com, paul.durrant@citrix.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/2] xen/block: add multi-page ring support References: <1432127422-6797-1-git-send-email-bob.liu@oracle.com> <1432127422-6797-2-git-send-email-bob.liu@oracle.com> <555DBFE9.7050701@citrix.com> In-Reply-To: <555DBFE9.7050701@citrix.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2119 Lines: 56 On 05/21/2015 07:22 PM, Roger Pau Monn? wrote: > El 20/05/15 a les 15.10, Bob Liu ha escrit: ... >> + } else { >> + unsigned int i; >> + >> + if (ring_page_order > xen_blkif_max_ring_order) { >> + err = -EINVAL; >> + xenbus_dev_fatal(dev, err, "%s/request %d ring page order exceed max:%d", >> + dev->otherend, ring_page_order, xen_blkif_max_ring_order); >> + return err; >> + } >> + >> + nr_grefs = 1 << ring_page_order; >> + for (i = 0; i < nr_grefs; i++) { >> + char ring_ref_name[RINGREF_NAME_LEN]; >> + >> + snprintf(ring_ref_name, sizeof(ring_ref_name), "ring-ref%u", i); > ^ RINGREF_NAME_LEN >> + err = xenbus_scanf(XBT_NIL, dev->otherend, >> + ring_ref_name, "%u", &ring_ref[i]); > > No need to split lines unless they are > 100 chars (here and elsewhere). > Not 82 chars? >> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c >> index 88e23fd..3d1c6fb 100644 >> --- a/drivers/block/xen-blkfront.c >> +++ b/drivers/block/xen-blkfront.c >> @@ -98,7 +98,17 @@ static unsigned int xen_blkif_max_segments = 32; >> module_param_named(max, xen_blkif_max_segments, int, S_IRUGO); >> MODULE_PARM_DESC(max, "Maximum amount of segments in indirect requests (default is 32)"); >> >> -#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE) >> +static unsigned int xen_blkif_max_ring_order; >> +module_param_named(max_ring_page_order, xen_blkif_max_ring_order, int, S_IRUGO); >> +MODULE_PARM_DESC(max_ring_page_order, "Maximum order of pages to be used as the ring"); >> + >> +#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE * info->nr_ring_pages) > > Didn't we agreed that this macro should take a explicit info parameter? > Do you mean define like this? #define BLK_RING_SIZE(info) __CONST_RING_SIZE(blkif, PAGE_SIZE * info->nr_ring_pages) Thanks, -Bob -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/