block: Replace bi_integrity with bi_special
For commands like REQ_COPY we need a way to pass extra information along with each bio. Like integrity metadata this information must be available at the bottom of the stack so bi_private does not suffice. Rename the existing bi_integrity field to bi_special and make it a union so we can have different bio extensions for each class of command. We previously used bi_integrity != NULL as a way to identify whether a bio had integrity metadata or not. Introduce a REQ_INTEGRITY to be the indicator now that bi_special can contain different things. In addition, bio_integrity(bio) will now return a pointer to the integrity payload (when applicable). Signed-off-by:Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Sagi Grimberg <sagig@mellanox.com> Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- Documentation/block/data-integrity.txt 5 additions, 5 deletionsDocumentation/block/data-integrity.txt
- block/bio-integrity.c 10 additions, 9 deletionsblock/bio-integrity.c
- drivers/scsi/sd_dif.c 4 additions, 4 deletionsdrivers/scsi/sd_dif.c
- include/linux/bio.h 9 additions, 2 deletionsinclude/linux/bio.h
- include/linux/blk_types.h 6 additions, 2 deletionsinclude/linux/blk_types.h
- include/linux/blkdev.h 2 additions, 5 deletionsinclude/linux/blkdev.h
Loading
Please register or sign in to comment