Commit 0b120ed
scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset
Most drives rewind the tape when the device is reset. Reading and writing
are not allowed until something is done to make the tape position match the
user's expectation (e.g., rewind the tape). Add MTIOCGET and MTLOAD to
operations allowed after reset. MTIOCGET is modified to not touch the tape
if pos_unknown is non-zero. The tape location is known after MTLOAD.
Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219419#c14
Link: https://lore.kernel.org/r/20241106095723.63254-3-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>1 parent 5bb2d61 commit 0b120ed
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3506 | 3506 | | |
3507 | 3507 | | |
3508 | 3508 | | |
| 3509 | + | |
3509 | 3510 | | |
3510 | 3511 | | |
3511 | 3512 | | |
| |||
3619 | 3620 | | |
3620 | 3621 | | |
3621 | 3622 | | |
| 3623 | + | |
3622 | 3624 | | |
3623 | 3625 | | |
3624 | 3626 | | |
| |||
3732 | 3734 | | |
3733 | 3735 | | |
3734 | 3736 | | |
| 3737 | + | |
| 3738 | + | |
3735 | 3739 | | |
3736 | | - | |
3737 | | - | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | | - | |
| 3740 | + | |
| 3741 | + | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
3743 | 3756 | | |
3744 | 3757 | | |
3745 | | - | |
| 3758 | + | |
3746 | 3759 | | |
3747 | 3760 | | |
3748 | 3761 | | |
| |||
0 commit comments