• James Smart's avatar
    nvme_fcloop: split job struct from transport for req_release · ce79bfc2
    James Smart authored
    Current design has the fcloop job struct, used for both initiator and
    target processing, allocated as part of the initiator request structure.
    On aborts, the initiator side (based on the request) may terminate, yet
    the target side wants to continue processing. the target side can't do
    that if the initiator side goes away.
    Revise fcloop to allocate an independent target side structure when it
    starts an io from the initiator.
    
    Added a lock to the request struct as well to synchronize pointer updates
    on abort calls.
    
    Modified target downcalls to recognize conditions where initiator has
    aborted the io (thus nulled the pointer between job structs), thus
    avoid referencing sgl lists which are gone and no longer making upcalls
    to the initiator.
    
    In conditions where the targetport is no longer connected, have the
    initiator return an access failure rather than simulating a command
    completion.
    Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    ce79bfc2
fcloop.c 26.1 KB