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

2013-04-12 Thread Michael S. Tsirkin
On Tue, Apr 02, 2013 at 09:27:57AM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > Rusty's currently doing some reorgs of -net let's delay > > cleanups there to avoid stepping on each other's toys. > > Let's focus on scsi here. > > E.g. any chance framing assumptions can be fixed in

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

2013-04-02 Thread Asias He
On Tue, Apr 02, 2013 at 06:18:33PM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 02, 2013 at 11:10:02PM +0800, Asias He wrote: > > On Tue, Apr 02, 2013 at 03:15:31PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Apr 01, 2013 at 10:13:47AM +0800, Asias He wrote: > > > > On Sun, Mar 31, 2013 at 11:

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

2013-04-02 Thread Michael S. Tsirkin
On Tue, Apr 02, 2013 at 11:10:02PM +0800, Asias He wrote: > On Tue, Apr 02, 2013 at 03:15:31PM +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 01, 2013 at 10:13:47AM +0800, Asias He wrote: > > > On Sun, Mar 31, 2013 at 11:20:24AM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Mar 29, 2013 at 02:

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

2013-04-02 Thread Asias He
On Tue, Apr 02, 2013 at 03:15:31PM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 01, 2013 at 10:13:47AM +0800, Asias He wrote: > > On Sun, Mar 31, 2013 at 11:20:24AM +0300, Michael S. Tsirkin wrote: > > > On Fri, Mar 29, 2013 at 02:22:52PM +0800, Asias He wrote: > > > > On Thu, Mar 28, 2013 at 11:

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

2013-04-02 Thread Michael S. Tsirkin
On Tue, Apr 02, 2013 at 09:27:57AM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > Rusty's currently doing some reorgs of -net let's delay > > cleanups there to avoid stepping on each other's toys. > > Let's focus on scsi here. > > E.g. any chance framing assumptions can be fixed in

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

2013-04-02 Thread Michael S. Tsirkin
On Mon, Apr 01, 2013 at 10:13:47AM +0800, Asias He wrote: > On Sun, Mar 31, 2013 at 11:20:24AM +0300, Michael S. Tsirkin wrote: > > On Fri, Mar 29, 2013 at 02:22:52PM +0800, Asias He wrote: > > > On Thu, Mar 28, 2013 at 11:18:22AM +0200, Michael S. Tsirkin wrote: > > > > On Thu, Mar 28, 2013 at 04:

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

2013-04-01 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Rusty's currently doing some reorgs of -net let's delay > cleanups there to avoid stepping on each other's toys. > Let's focus on scsi here. > E.g. any chance framing assumptions can be fixed in 3.10? I am waiting for your removal of the dma-compelete ordering stuff

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

2013-03-31 Thread Asias He
On Sun, Mar 31, 2013 at 11:23:12AM +0300, Michael S. Tsirkin wrote: > On Fri, Mar 29, 2013 at 02:27:50PM +0800, Asias He wrote: > > On Thu, Mar 28, 2013 at 11:06:15AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Mar 28, 2013 at 04:47:15PM +0800, Asias He wrote: > > > > On Thu, Mar 28, 2013 at 10:

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

2013-03-31 Thread Asias He
On Sun, Mar 31, 2013 at 11:20:24AM +0300, Michael S. Tsirkin wrote: > On Fri, Mar 29, 2013 at 02:22:52PM +0800, Asias He wrote: > > On Thu, Mar 28, 2013 at 11:18:22AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > > > On Thu, Mar 28, 2013 at 08:

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

2013-03-31 Thread Michael S. Tsirkin
On Fri, Mar 29, 2013 at 02:27:50PM +0800, Asias He wrote: > On Thu, Mar 28, 2013 at 11:06:15AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2013 at 04:47:15PM +0800, Asias He wrote: > > > On Thu, Mar 28, 2013 at 10:33:30AM +0200, Michael S. Tsirkin wrote: > > > > On Thu, Mar 28, 2013 at 04:

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

2013-03-31 Thread Michael S. Tsirkin
On Fri, Mar 29, 2013 at 02:22:52PM +0800, Asias He wrote: > On Thu, Mar 28, 2013 at 11:18:22AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > > > On Thu, Mar 28, 2013 at 10:

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

2013-03-28 Thread Asias He
On Thu, Mar 28, 2013 at 11:06:15AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 28, 2013 at 04:47:15PM +0800, Asias He wrote: > > On Thu, Mar 28, 2013 at 10:33:30AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > > > On Thu, Mar 28, 2013 at 08:

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

2013-03-28 Thread Asias He
On Thu, Mar 28, 2013 at 11:18:22AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Mar 28, 2013 at 10:17:28AM +0800, Asias He wrote: > > > > Currently, vs->vs_endpoint

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

2013-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2013 at 10:17:28AM +0800, Asias He wrote: > > > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > > > not. It is set or cleared

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

2013-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2013 at 04:47:15PM +0800, Asias He wrote: > On Thu, Mar 28, 2013 at 10:33:30AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > > > On Thu, Mar 28, 2013 at 10:

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

2013-03-28 Thread Asias He
On Thu, Mar 28, 2013 at 10:33:30AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > > On Thu, Mar 28, 2013 at 10:17:28AM +0800, Asias He wrote: > > > > Currently, vs->vs_endpoint

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

2013-03-28 Thread Michael S. Tsirkin
On Thu, Mar 28, 2013 at 04:10:02PM +0800, Asias He wrote: > On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 28, 2013 at 10:17:28AM +0800, Asias He wrote: > > > Currently, vs->vs_endpoint is used indicate if the endpoint is setup or > > > not. It is set or cleared

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

2013-03-28 Thread Asias He
On Thu, Mar 28, 2013 at 08:16:59AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 28, 2013 at 10:17:28AM +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() u

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

2013-03-27 Thread Michael S. Tsirkin
On Thu, Mar 28, 2013 at 10:17:28AM +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

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

2013-03-27 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