WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] xen/blkback: add xen-blkback support

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [PATCH] xen/blkback: add xen-blkback support
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Mon, 18 Apr 2011 14:12:11 -0400
Delivery-date: Mon, 18 Apr 2011 11:13:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1303149464-875-2-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1303149464-875-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1303149464-875-2-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
Talk about self-review :-)

> index 90f22cc..9b60e69 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -351,6 +351,7 @@ void blk_put_queue(struct request_queue *q)
>  {
>       kobject_put(&q->kobj);
>  }
> +EXPORT_SYMBOL_GPL(blk_put_queue);
>  
>  /*
>   * Note: If a driver supplied the queue lock, it should not zap that lock
> @@ -572,6 +573,7 @@ int blk_get_queue(struct request_queue *q)
>  
>       return 1;
>  }
> +EXPORT_SYMBOL_GPL(blk_get_queue);
>

.. snip..
> +static void dispatch_rw_block_io(struct blkif_st *blkif,
.. snip..
> +     struct request_queue *q;

.. snip

> +     q = bdev_get_queue(preq.bdev);
> +     if (!q)
> +             goto fail_response;
.. snip..
> +     /* Get a reference count for the disk queue and start sending I/O */
> +     blk_get_queue(q);
> +     blk_start_plug(&plug);
> +
> +     for (i = 0; i < nbio; i++)
> +             submit_bio(operation, biolist[i]);
> +
> +     blk_finish_plug(&plug);
> +     /* Let the I/Os go.. */
> +     blk_put_queue(q);

Hmm, let me remove those get/puts. They are actually not necessary as we
already hold a reference count when we opened the device.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel