public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] scsi: scsi_debug: Add more tape support
@ 2025-01-28 14:22 Kai Mäkisara
  2025-01-28 14:22 ` [RFC PATCH 1/6] scsi: scsi_debug: First fixes for tapes Kai Mäkisara
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Kai Mäkisara @ 2025-01-28 14:22 UTC (permalink / raw)
  To: linux-scsi, dgilbert; +Cc: jmeneghi, Kai Mäkisara

These changes to the scsi_debug driver have been made to support testing
of the st driver. This is a RFC to see if there is interest to add
this to the kernel scsi_debug driver.

Currently, the scsi_debug driver can create tape devices and the st
driver attaches to those. Nothing much can be done with the tape devices
because scsi_debug does not have support for the tape-specific commands
and features. These patches add some more tape support to the scsi_debug
driver. The end result is simulated drives with a tape having two
partitions (i.e., partitioning can't be changed).

The tape partitions are implemented as fixed number of 8-byte
units (partition zero 100 000 units and partition one 1000 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 four 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 following SCSI operations are added or modified:
LOCATE
- added
MODE SELECT
- modified to allow use without page(s) (just header and block descriptor)
  - store density and block size
MODE SENSE
- modified to allow use without page(s) (just header and block descriptor)
  - set density and block size
- partition page added
READ BLOCK LIMITS
- added
READ POSITION
- added
READ
- added tape support for READ (6)
REWIND
- modified to set the tape position
SPACE
- added
START STOP (LOAD)
- modified to return New Medium Unit Attention if tape loaded (not
  according to the standard, but enables testing this UA)
WRITE
- added tape support for WRITE (6)
WRITE FILEMARKS
- added

Kai Mäkisara (6):
  scsi: scsi_debug: First fixes for tapes
  scsi: scsi_debug: Add READ BLOCK LIMITS and modify LOAD for tapes
  scsi: scsi_debug: Add tape write support with block lengths  and
    4 bytes of data
  scsi: scsi_debug: Add read support and update locate for tapes
  scsi: scsi_debug: Add compression mode page for tapes
  scsi: scsi_debug: Reset tape setting at device reset

 drivers/scsi/scsi_debug.c | 630 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 618 insertions(+), 12 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-01-30 21:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 14:22 [RFC PATCH 0/6] scsi: scsi_debug: Add more tape support Kai Mäkisara
2025-01-28 14:22 ` [RFC PATCH 1/6] scsi: scsi_debug: First fixes for tapes Kai Mäkisara
2025-01-30 17:58   ` John Meneghini
2025-01-28 14:22 ` [RFC PATCH 2/6] scsi: scsi_debug: Add READ BLOCK LIMITS and modify LOAD " Kai Mäkisara
2025-01-28 17:32   ` Bart Van Assche
2025-01-30 18:01   ` John Meneghini
2025-01-28 14:22 ` [RFC PATCH 3/6] scsi: scsi_debug: Add tape write support with block lengths and 4 bytes of data Kai Mäkisara
2025-01-30 21:45   ` John Meneghini
2025-01-28 14:22 ` [RFC PATCH 4/6] scsi: scsi_debug: Add read support and update locate for tapes Kai Mäkisara
2025-01-30 21:46   ` John Meneghini
2025-01-28 14:22 ` [RFC PATCH 5/6] scsi: scsi_debug: Add compression mode page " Kai Mäkisara
2025-01-30 21:49   ` John Meneghini
2025-01-28 14:22 ` [RFC PATCH 6/6] scsi: scsi_debug: Reset tape setting at device reset Kai Mäkisara
2025-01-30 21:58   ` John Meneghini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox