Re: [PATCH v2] virtio-blk: Fix hot-unplug race in remove method

2012-05-04 Thread Michael S. Tsirkin
On Fri, May 04, 2012 at 04:37:45PM +0800, Asias He wrote: > On 05/03/2012 03:56 PM, Michael S. Tsirkin wrote: > >On Thu, May 03, 2012 at 03:30:47PM +0800, Asias He wrote: > >>If we reset the virtio-blk device before the requests already dispatched > >>to the virtio-blk driver from the block layer a

Re: [PATCH v2] virtio-blk: Fix hot-unplug race in remove method

2012-05-04 Thread Asias He
On 05/03/2012 03:56 PM, Michael S. Tsirkin wrote: On Thu, May 03, 2012 at 03:30:47PM +0800, Asias He wrote: If we reset the virtio-blk device before the requests already dispatched to the virtio-blk driver from the block layer are finised, we will stuck in blk_cleanup_queue() and the remove will

Re: [PATCH v2] virtio-blk: Fix hot-unplug race in remove method

2012-05-03 Thread Michael S. Tsirkin
On Thu, May 03, 2012 at 03:30:47PM +0800, Asias He wrote: > If we reset the virtio-blk device before the requests already dispatched > to the virtio-blk driver from the block layer are finised, we will stuck > in blk_cleanup_queue() and the remove will fail. > > blk_cleanup_queue() calls blk_drain