scsi: sd: Translate data lifetime information
authorBart Van Assche <bvanassche@acm.org>
Tue, 30 Jan 2024 21:48:37 +0000 (13:48 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 27 Feb 2024 02:37:26 +0000 (21:37 -0500)
commit4f53138fffc2b18396859aa4ff3e7ef2b0839c2b
treedf53810b404ad229d6748ab5107b68866e6c2545
parent4977c0f4523e1d6c87df4eedceb33d38f055c5fb
scsi: sd: Translate data lifetime information

Recently T10 standardized SBC constrained streams. This mechanism allows to
pass data lifetime information to SCSI devices in the group number field.
Add support for translating write hint information into a permanent stream
number in the sd driver. Use WRITE(10) instead of WRITE(6) if data lifetime
information is present because the WRITE(6) command does not have a GROUP
NUMBER field.

Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240130214911.1863909-12-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c
drivers/scsi/sd.h