From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632AbbLHM0j (ORCPT ); Tue, 8 Dec 2015 07:26:39 -0500 Received: from smtp.citrix.com ([66.165.176.89]:34542 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbbLHM0i (ORCPT ); Tue, 8 Dec 2015 07:26:38 -0500 X-IronPort-AV: E=Sophos;i="5.20,399,1444694400"; d="scan'208";a="317267502" Message-ID: <5666CC29.5070209@citrix.com> Date: Tue, 8 Dec 2015 12:25:13 +0000 From: Julien Grall User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Konrad Rzeszutek Wilk CC: , Boris Ostrovsky , =?windows-1252?Q?Roger_Pau_Monn=E9?= , , David Vrabel Subject: Re: [Xen-devel] [PATCH v3 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity References: <1447873045-14663-1-git-send-email-julien.grall@citrix.com> <20151201153751.GE19885@char.us.oracle.com> <565DDF24.4000104@citrix.com> <20151201185245.GB27063@char.us.oracle.com> In-Reply-To: <20151201185245.GB27063@char.us.oracle.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, The rebase of my patch is not correct. It now contains an unused variable and missing one change. I will post the rebase of the two patches. On 01/12/15 18:52, Konrad Rzeszutek Wilk wrote: > +static unsigned long blkif_ring_get_request(struct blkfront_ring_info *rinfo, > + struct request *req, > + struct blkif_request **ring_req) > +{ > + unsigned long id; > + struct blkfront_info *info = rinfo->dev_info; This variable is unused within the function. > + > + *ring_req = RING_GET_REQUEST(&rinfo->ring, rinfo->ring.req_prod_pvt); > + rinfo->ring.req_prod_pvt++; > + > + id = get_id_from_freelist(rinfo); > + rinfo->shadow[id].request = req; > + > + (*ring_req)->u.rw.id = id; > + > + return id; > +} > + > static int blkif_queue_discard_req(struct request *req, struct blkfront_ring_info *rinfo) > { > struct blkfront_info *info = rinfo->dev_info; > @@ -488,9 +506,7 @@ static int blkif_queue_discard_req(struct request *req, struct blkfront_ring_inf > unsigned long id; > > /* Fill out a communications ring structure. */ > - ring_req = RING_GET_REQUEST(&rinfo->ring, rinfo->ring.req_prod_pvt); > - id = get_id_from_freelist(rinfo); > - rinfo->shadow[id].request = req; > + id = blkif_ring_get_request(rinfo, req, &ring_req); > > ring_req->operation = BLKIF_OP_DISCARD; > ring_req->u.discard.nr_sectors = blk_rq_sectors(req); > @@ -501,8 +517,6 @@ static int blkif_queue_discard_req(struct request *req, struct blkfront_ring_inf > else > ring_req->u.discard.flag = 0; > > - rinfo->ring.req_prod_pvt++; > - > /* Keep a private copy so we can reissue requests when recovering. */ > rinfo->shadow[id].req = *ring_req; > > @@ -635,9 +649,7 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri > } > > /* Fill out a communications ring structure. */ > - ring_req = RING_GET_REQUEST(&rinfo->ring, rinfo->ring.req_prod_pvt); > - id = get_id_from_freelist(rinfo); > - rinfo->shadow[id].request = req; > + id = blkif_ring_get_request(rinfo, req, &ring_req); > > BUG_ON(info->max_indirect_segments == 0 && > GREFS(req->nr_phys_segments) > BLKIF_MAX_SEGMENTS_PER_REQUEST); @@ -650,7 +661,6 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri for_each_sg(rinfo->shadow[id].sg, sg, num_sg, i) num_grant += gnttab_count_grant(sg->offset, sg->length); - ring_req->u.rw.id = id; rinfo->shadow[id].num_sg = num_sg; if (num_grant > BLKIF_MAX_SEGMENTS_PER_REQUEST) { /* > @@ -716,8 +728,6 @@ static int blkif_queue_rw_req(struct request *req, struct blkfront_ring_info *ri > if (setup.segments) > kunmap_atomic(setup.segments); > > - rinfo->ring.req_prod_pvt++; > - > /* Keep a private copy so we can reissue requests when recovering. */ > rinfo->shadow[id].req = *ring_req; Regards, -- Julien Grall