Re: [PATCH 1/6] virtiofsd: Drop ->vu_dispatch_rwlock while waiting for thread to exit

2021-01-29 Thread Vivek Goyal
On Fri, Jan 29, 2021 at 01:03:09PM +0100, Greg Kurz wrote: > On Tue, 26 Jan 2021 13:33:36 -0500 > Vivek Goyal wrote: > > [...] > > > > > > > Also, since pthread_rwlock_wrlock() can fail, I think we should > > > always check it's return value, at least with an assert() like > > > already done

Re: [PATCH 1/6] virtiofsd: Drop ->vu_dispatch_rwlock while waiting for thread to exit

2021-01-29 Thread Greg Kurz
On Tue, 26 Jan 2021 13:33:36 -0500 Vivek Goyal wrote: [...] > > > > Also, since pthread_rwlock_wrlock() can fail, I think we should > > always check it's return value, at least with an assert() like > > already done elsewhere. > > Will check return code of pthread_rwlock_wrlock() and

Re: [PATCH 1/6] virtiofsd: Drop ->vu_dispatch_rwlock while waiting for thread to exit

2021-01-26 Thread Vivek Goyal
On Tue, Jan 26, 2021 at 04:56:00PM +0100, Greg Kurz wrote: > On Mon, 25 Jan 2021 13:01:10 -0500 > Vivek Goyal wrote: > > > When we are shutting down virtqueues, virtio_loop() receives a message > > VHOST_USER_GET_VRING_BASE from master. We acquire ->vu_dispatch_rwlock > > and get into the

Re: [PATCH 1/6] virtiofsd: Drop ->vu_dispatch_rwlock while waiting for thread to exit

2021-01-26 Thread Greg Kurz
On Mon, 25 Jan 2021 13:01:10 -0500 Vivek Goyal wrote: > When we are shutting down virtqueues, virtio_loop() receives a message > VHOST_USER_GET_VRING_BASE from master. We acquire ->vu_dispatch_rwlock > and get into the process of shutting down virtqueue. In one of the > final steps, we are

[PATCH 1/6] virtiofsd: Drop ->vu_dispatch_rwlock while waiting for thread to exit

2021-01-25 Thread Vivek Goyal
When we are shutting down virtqueues, virtio_loop() receives a message VHOST_USER_GET_VRING_BASE from master. We acquire ->vu_dispatch_rwlock and get into the process of shutting down virtqueue. In one of the final steps, we are waiting for fv_queue_thread() to exit/finish and wait with