target/file: Add DIF protection support to fd_execute_rw
authorNicholas Bellinger <nab@linux-iscsi.org>
Sat, 18 Jan 2014 09:33:48 +0000 (09:33 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 19 Jan 2014 02:21:55 +0000 (02:21 +0000)
commit42201b557471f2fef2e9e028b50a773d99ffc401
treeb24fbaf77eed5cf01d384137a9d143981c6d31fd
parent0f5e2ec46dd64579c0770f3822764f94db4fa465
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>
drivers/target/target_core_file.c
drivers/target/target_core_file.h