• Nicholas Bellinger's avatar
    target: Perform PROTECT sanity checks for WRITE_SAME · afd73f1b
    Nicholas Bellinger authored
    This patch adds a call to sbc_check_prot() within sbc_setup_write_same()
    code to perform the various protection releated sanity checks, including
    failing if WRPROTECT or RDPROTECT is set for a backend device that has
    not advertised support for T10-PI.
    
    Also, since WRITE_SAME + T10-PI is currently not supported by IBLOCK +
    FILEIO backends, go ahead and fail if ->execute_write_same() is invoked
    with a non zero cmd->prot_op.
    
    Cc: Martin Petersen <martin.petersen@oracle.com>
    Cc: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    afd73f1b
target_core_sbc.c 36.1 KB