Re: [RFC PATCH 5/5] virtio-blk: Use block layer provided spinlock

2012-05-22 Thread Asias He
On 05/22/2012 04:59 AM, Michael S. Tsirkin wrote: On Mon, May 21, 2012 at 05:08:33PM +0800, Asias He wrote: Block layer will allocate a spinlock for the queue if the driver does not provide one in blk_init_queue(). The reason to use the internal spinlock is that blk_cleanup_queue() will switch

Re: [RFC PATCH 5/5] virtio-blk: Use block layer provided spinlock

2012-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2012 at 05:08:33PM +0800, Asias He wrote: > Block layer will allocate a spinlock for the queue if the driver does > not provide one in blk_init_queue(). > > The reason to use the internal spinlock is that blk_cleanup_queue() will > switch to use the internal spinlock in the cleanup

[RFC PATCH 5/5] virtio-blk: Use block layer provided spinlock

2012-05-21 Thread Asias He
Block layer will allocate a spinlock for the queue if the driver does not provide one in blk_init_queue(). The reason to use the internal spinlock is that blk_cleanup_queue() will switch to use the internal spinlock in the cleanup code path. if (q->queue_lock != &q->__queue_lock)