• Mike Christie's avatar
    vhost: Release worker mutex during flushes · ba704ff4
    Mike Christie authored
    
    
    In the next patches where the worker can be killed while in use, we
    need to be able to take the worker mutex and kill queued works for
    new IO and flushes, and set some new flags to prevent new
    __vhost_vq_attach_worker calls from swapping in/out killed workers.
    
    If we are holding the worker mutex during a flush and the flush's work
    is still in the queue, the worker code that will handle the SIGKILL
    cleanup won't be able to take the mutex and perform it's cleanup. So
    this patch has us drop the worker mutex while waiting for the flush
    to complete.
    Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
    Message-Id: <20240316004707.45557-8-michael.christie@oracle.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    ba704ff4
vhost.c 70.2 KB