• David Disseldorp's avatar
    target: check for XCOPY parameter truncation · f94fd098
    David Disseldorp authored
    Check for XCOPY header, CSCD descriptor and segment descriptor list
    truncation, and respond accordingly.
    
    SPC4r37 6.4.1 EXTENDED COPY(LID4) states (also applying to LID1 reqs):
      If the parameter list length causes truncation of the parameter list,
      then the copy manager shall transfer no data and shall terminate the
      EXTENDED COPY command with CHECK CONDITION status, with the sense key
      set to ILLEGAL REQUEST, and the additional sense code set to PARAMETER
      LIST LENGTH ERROR.
    
    This behaviour can be tested using the libiscsi ExtendedCopy.ParamHdr
    test.
    Signed-off-by: default avatarDavid Disseldorp <ddiss@suse.de>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
    f94fd098
target_core_xcopy.c 29.9 KB