• Nicholas Bellinger's avatar
    target/sbc: Add DIF setup in sbc_check_prot + sbc_parse_cdb · 499bf77b
    Nicholas Bellinger authored
    This patch adds sbc_check_prot() for performing various DIF
    related CDB sanity checks, along with setting cmd->prot_type
    once sanity checks have passed.
    
    Also, add calls in sbc_parse_cdb() for READ_[10,12,16] +
    WRITE_[10,12,16] to perform DIF sanity checking.
    
    v2 changes:
      - Make sbc_check_prot defined as static (Fengguang + Wei)
      - Remove unprotected READ/WRITE warning (mkp)
      - Populate cmd->prot_type + friends (Sagi)
      - Drop SCF_PROT usage
    
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Hannes Reinecke <hare@suse.de>
    Cc: Sagi Grimberg <sagig@mellanox.com>
    Cc: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    499bf77b
target_core_sbc.c 27.1 KB