All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org,
	"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"David Vrabel" <david.vrabel@citrix.com>,
	linux-kernel@vger.kernel.org,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v3 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity
Date: Tue, 8 Dec 2015 12:25:13 +0000	[thread overview]
Message-ID: <5666CC29.5070209__33422.9033127942$1449577673$gmane$org@citrix.com> (raw)
In-Reply-To: <20151201185245.GB27063@char.us.oracle.com>

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

  parent reply	other threads:[~2015-12-08 12:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 18:57 [PATCH v3 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity Julien Grall
2015-11-18 18:57 ` [PATCH v3 1/2] block/xen-blkfront: Introduce blkif_ring_get_request Julien Grall
2015-11-18 18:57 ` Julien Grall
2015-11-18 18:57 ` [PATCH v3 2/2] block/xen-blkfront: Handle non-indirect grant with 64KB pages Julien Grall
2015-11-18 18:57 ` Julien Grall
2015-12-01 15:30   ` Roger Pau Monné
2015-12-01 15:30   ` Roger Pau Monné
2015-12-08 12:45     ` Julien Grall
2015-12-08 12:45     ` [Xen-devel] " Julien Grall
2015-11-30 16:16 ` [PATCH v3 0/2] block/xen-blkfront: Support non-indirect grant with 64KB page granularity Julien Grall
2015-11-30 16:16 ` [Xen-devel] " Julien Grall
2015-11-30 18:45 ` Julien Grall
2015-11-30 18:45 ` Julien Grall
2015-12-01 15:37 ` Konrad Rzeszutek Wilk
2015-12-01 17:55   ` [Xen-devel] " Julien Grall
2015-12-01 18:52     ` Konrad Rzeszutek Wilk
2015-12-07 14:21       ` Julien Grall
2015-12-07 14:21       ` [Xen-devel] " Julien Grall
2015-12-07 15:01         ` Konrad Rzeszutek Wilk
2015-12-08 12:51           ` Julien Grall
2015-12-08 12:51           ` [Xen-devel] " Julien Grall
2015-12-08 19:28             ` Konrad Rzeszutek Wilk
2015-12-08 12:25       ` Julien Grall [this message]
2015-12-08 12:25       ` [Xen-devel] " Julien Grall
2015-12-01 17:55   ` Julien Grall
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18 18:57 Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='5666CC29.5070209__33422.9033127942$1449577673$gmane$org@citrix.com' \
    --to=julien.grall@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.