[SCSI] scsi_debug: factor out copying PI from dif_storep to prot_sglist
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 18 Sep 2013 12:27:25 +0000 (21:27 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Fri, 25 Oct 2013 08:58:11 +0000 (09:58 +0100)
commitbb8c063c6afcd930b8da944927144f2982609638
tree2c056f02c74ac1965bd61b4d132c642782b4d7c5
parent14faa944b6fa4c77a6f386806c33ce2c3c77b3a4
[SCSI] scsi_debug: factor out copying PI from dif_storep to prot_sglist

If data integrity support is enabled, prot_verify_read() is called in
response to READ commands and it verifies protection info from dif_storep
by comparing against fake_storep, and copies protection info to
prot_sglist.

This factors out the portion of copying protection info into a separate
function.  It will also be reused in the next change after supporting
the opposite direction (copying prot_sglist to dif_storep).

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_debug.c