diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-01-18 09:33:48 +0000 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-01-19 02:21:55 +0000 |
commit | 42201b557471f2fef2e9e028b50a773d99ffc401 (patch) | |
tree | b24fbaf77eed5cf01d384137a9d143981c6d31fd /drivers/target/target_core_file.h | |
parent | 0f5e2ec46dd64579c0770f3822764f94db4fa465 (diff) | |
download | linux-stable-42201b557471f2fef2e9e028b50a773d99ffc401.tar.gz linux-stable-42201b557471f2fef2e9e028b50a773d99ffc401.tar.bz2 linux-stable-42201b557471f2fef2e9e028b50a773d99ffc401.zip |
target/file: Add DIF protection support to fd_execute_rw
This patch adds support for DIF protection into fd_execute_rw() code
for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic.
It adds fd_do_prot_rw() for handling interface with FILEIO PI, and
uses a locally allocated fd_prot->prot_buf + fd_prot->prot_sg for
interacting with SBC DIF verify emulation code.
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_file.h')
-rw-r--r-- | drivers/target/target_core_file.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/target/target_core_file.h b/drivers/target/target_core_file.h index 583691ebcbe0..97e5e7dd4259 100644 --- a/drivers/target/target_core_file.h +++ b/drivers/target/target_core_file.h @@ -18,6 +18,11 @@ #define FDBD_HAS_BUFFERED_IO_WCE 0x04 #define FDBD_FORMAT_UNIT_SIZE 2048 +struct fd_prot { + unsigned char *prot_buf; + struct scatterlist *prot_sg; + u32 prot_sg_nents; +}; struct fd_dev { struct se_device dev; |