]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
target/configfs: Expose protection device attributes
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Jan 2014 18:19:31 +0000 (18:19 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 18 Jan 2014 09:57:47 +0000 (09:57 +0000)
commit2ed22c9cbca61f0f696a0a1cbbb777da281bd79d
tree0cd4084400fedaebb9dd191fcf33c52594d5d71d
parent0c30f421a7dba0a7ca9a3f67dad15d84d4d61e01
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>
drivers/target/target_core_configfs.c
drivers/target/target_core_device.c
drivers/target/target_core_internal.h