[PATCH 1/2] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-21 Thread Asias He
Currently, vs->vs_endpoint is used indicate if the endpoint is setup or not. It is set or cleared in vhost_scsi_set_endpoint() or vhost_scsi_clear_endpoint() under the vs->dev.mutex lock. However, when we check it in vhost_scsi_handle_vq(), we ignored the lock. Instead of using the vs->vs_endpoint

Re: [PATCH 1/2] tcm_vhost: Use vq->private_data to indicate if the endpoint is setup

2013-03-25 Thread Michael S. Tsirkin
On Fri, Mar 22, 2013 at 10:52:27AM +0800, Asias He wrote: > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > not. It is set or cleared in vhost_scsi_set_endpoint() or > vhost_scsi_clear_endpoint() under the vs->dev.mutex lock. However, when > we check it in vhost_scsi_handl