]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: scsi_debug: Add write support with block lengths and 4 bytes of data
authorKai Mäkisara <Kai.Makisara@kolumbus.fi>
Thu, 13 Feb 2025 09:26:32 +0000 (11:26 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 24 Feb 2025 03:01:02 +0000 (22:01 -0500)
commite1ac21310aaa5810e08b2d2a9dcee93b60ad3f87
tree1e2174ed3f5c0b44beae0a8b22948eb3926d5c1b
parente7795366c41d7b31ab8c9c37bc07c1d058a99fed
scsi: scsi_debug: Add write support with block lengths and 4 bytes of data

The tape is implemented as fixed number (10 000) of 8-byte units.  The
first four bytes of a unit contains the type of the unit (data block,
filemark or end-of-data mark). If the units is a data block, the first four
bytes contain the block length and the remaining four bytes the first bytes
of written data. This allows the user to use tags to see that the read
block is what it was supposed to be.

The tape can contain two partitions. Initially it is formatted as one
partition consisting of all 10 000 units.

This patch adds the WRITE(6) command for tapes and the WRITE FILEMARKS (6)
command. The REWIND command is updated.

Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://lore.kernel.org/r/20250213092636.2510-4-Kai.Makisara@kolumbus.fi
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c