• Mike Christie's avatar
    tcmu: fix double se_cmd completion · 0d44374c
    Mike Christie authored
    If cmd_time_out != 0, then tcmu_queue_cmd_ring could end up
    sleeping waiting for ring space, timing out and then returning
    failure to lio, and tcmu_check_expired_cmd could also detect
    the timeout and call target_complete_cmd on the cmd.
    
    This patch just delays setting up the deadline value and adding
    the cmd to the udev->commands idr until we have allocated ring
    space and are about to send the cmd to userspace.
    Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    0d44374c
target_core_user.c 53 KB