• Nicholas Bellinger's avatar
    target/configfs: Expose protection device attributes · 2ed22c9c
    Nicholas Bellinger authored
    This patch adds support for exposing DIF protection device
    attributes via configfs.  This includes:
    
       pi_prot_type: Protection Type (0, 1, 3 currently support)
       pi_prot_format: Protection Format Operation (FILEIO only)
    
    Within se_dev_set_pi_prot_type() it also adds the se_subsystem_api
    device callbacks to setup per device protection information.
    
    v2 changes:
      - Drop pi_guard_type + pi_prot_version related code (MKP)
      - Add pi_prot_format logic (Sagi)
      - Add ->free_prot callback in target_free_device
      - Add hw_pi_prot_type read-only attribute
    
    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>
    2ed22c9c
target_core_configfs.c 88.4 KB