diff options
author | 2014-01-08 18:19:31 +0000 | |
---|---|---|
committer | 2014-01-18 09:57:47 +0000 | |
commit | 2ed22c9cbca61f0f696a0a1cbbb777da281bd79d (patch) | |
tree | 0cd4084400fedaebb9dd191fcf33c52594d5d71d /drivers/target/target_core_internal.h | |
parent | target/spc: Expose ATO bit in control mode page (diff) | |
download | linux-2ed22c9cbca61f0f696a0a1cbbb777da281bd79d.tar.gz linux-2ed22c9cbca61f0f696a0a1cbbb777da281bd79d.tar.bz2 linux-2ed22c9cbca61f0f696a0a1cbbb777da281bd79d.zip |
target/configfs: Expose protection device attributes
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: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_internal.h')
-rw-r--r-- | drivers/target/target_core_internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/target/target_core_internal.h b/drivers/target/target_core_internal.h index 1e27614e6bcc..de9cab708f45 100644 --- a/drivers/target/target_core_internal.h +++ b/drivers/target/target_core_internal.h @@ -35,6 +35,8 @@ int se_dev_set_emulate_tpu(struct se_device *, int); int se_dev_set_emulate_tpws(struct se_device *, int); int se_dev_set_emulate_caw(struct se_device *, int); int se_dev_set_emulate_3pc(struct se_device *, int); +int se_dev_set_pi_prot_type(struct se_device *, int); +int se_dev_set_pi_prot_format(struct se_device *, int); int se_dev_set_enforce_pr_isids(struct se_device *, int); int se_dev_set_is_nonrot(struct se_device *, int); int se_dev_set_emulate_rest_reord(struct se_device *dev, int); |