Re: [PATCH] virtio-scsi: replace target spinlock with seqcount

2014-05-28 Thread Paolo Bonzini
Il 28/05/2014 03:48, Ming Lei ha scritto: On Wed, May 28, 2014 at 12:57 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/05/2014 18:50, Venkatesh Srinivas ha scritto: Hi, I think this patch has a small race involving just two commands: 1. The first command to a target is in

Re: [PATCH] virtio-scsi: replace target spinlock with seqcount

2014-05-27 Thread Venkatesh Srinivas
Hi, I think this patch has a small race involving just two commands: 1. The first command to a target is in virtscsi_pick_vq(), after atomic_inc_return(tgt-tgt_lock)) but before write_seqcount_begin() 2. A second command to the same target enters virtscsi_pick_vq(). It will hit the same

Re: [PATCH] virtio-scsi: replace target spinlock with seqcount

2014-05-27 Thread Paolo Bonzini
Il 27/05/2014 18:50, Venkatesh Srinivas ha scritto: Hi, I think this patch has a small race involving just two commands: 1. The first command to a target is in virtscsi_pick_vq(), after atomic_inc_return(tgt-tgt_lock)) but before write_seqcount_begin() 2. A second command to the same target

Re: [PATCH] virtio-scsi: replace target spinlock with seqcount

2014-05-27 Thread Ming Lei
On Wed, May 28, 2014 at 12:57 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/05/2014 18:50, Venkatesh Srinivas ha scritto: Hi, I think this patch has a small race involving just two commands: 1. The first command to a target is in virtscsi_pick_vq(), after