target/rd: Add DIF protection into rd_execute_rw
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Jan 2014 12:06:30 +0000 (12:06 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sun, 19 Jan 2014 02:22:06 +0000 (02:22 +0000)
commit6e611119b16c73a6e1c450d00deb4d7eef853336
tree31aed1d847f113481d285fd44db308815b1f8b5a
parentd7e8eb5d9216c6a4f963aa6d07e29680af17d739
target/rd: Add DIF protection into rd_execute_rw

This patch adds support for DIF protection into rd_execute_rw() code
for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic.

It also adds rd_get_prot_table() for locating protection SGLs
assoicated with the ramdisk backend device.

v2 changes:
  - Make rd_execute_rw() to u32 sectors count instead of sector_t
  - Drop SCF_PROT usage

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_rd.c