]> git.baikalelectronics.ru Git - kernel.git/commit
block: Integrity checksum flag
authorMartin K. Petersen <martin.petersen@oracle.com>
Fri, 26 Sep 2014 23:20:05 +0000 (19:20 -0400)
committerJens Axboe <axboe@fb.com>
Sat, 27 Sep 2014 15:14:55 +0000 (09:14 -0600)
commitc0c10aa18108a19503b002046678ff5beafb9a80
tree5c10de05e0ebb21e83c5785b2d03ff10ea9e60dc
parent270d54893c70b072aec2b6bef91d1110573c88c2
block: Integrity checksum flag

Make the choice of checksum a per-I/O property by introducing a flag
that can be inspected by the SCSI layer. There are several reasons for
this:

 1. It allows us to switch choice of checksum without unloading and
    reloading the HBA driver.

 2. During error recovery we need to be able to tell the HBA that
    checksums read from disk should not be verified and converted to IP
    checksums.

 3. For error injection purposes we need to be able to write a bad guard
    tag to storage. Since the storage device only supports T10 CRC we
    need to be able to disable IP checksum conversion on the HBA.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio-integrity.c
drivers/scsi/sd_dif.c
include/linux/bio.h
include/linux/blkdev.h