> On 4.2.2016, at 3.43, Seymour, Shane M <[email protected]> wrote:
>
> Hi Kai,
>
> Tested with patched kernel 4.5.0-rc2-next-20160202+. It's looking good
> everything partition related passed with DDS5 and LTO6. You can definitely
> add me as a tested-by. I did find one issue below but it's not related to the
> partitioning changes.
>
Thanks for testing. It would be interesting to get confirmation from a LTO-5
user that partitioning
works. Even without that I will make the final patch within a few days (remove
some debugging
and update the documentation).
...
> I did find one issue in testing unrelated to the changes, the tell option
> didn't work with my LTO-6 drive:
>
> # ./mt -f /dev/st0 tell
> /dev/st0: Input/output error
>
> [ 2045.974642] st 3:0:0:0: [st0] Block limits 1 - 16777215 bytes.
> [ 2045.975221] st 3:0:0:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL
> 8
> [ 2045.975224] st 3:0:0:0: [st0] Density 5a, tape length: 0, drv buffer: 1
> [ 2045.975226] st 3:0:0:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
> [ 2045.975718] st 3:0:0:0: [st0] Error: 8000002, cmd: 34 1 0 0 0 0
> [ 2045.975723] st 3:0:0:0: [st0] Sense Key : Illegal Request [current]
> [ 2045.975726] st 3:0:0:0: [st0] Add. Sense: Invalid field in cdb
> [ 2045.975729] st 3:0:0:0: [st0] Can't read tape position.
> [ 2045.975857] st 3:0:0:0: [st0] Rewinding tape.
>
> I believe that in get_location() we're doing this:
>
> static int get_location(struct scsi_tape *STp, unsigned int *block, int
> *partition,
> int logical)
> {
> int result;
> unsigned char scmd[MAX_COMMAND_SIZE];
> struct st_request *SRpnt;
>
> if (STp->ready != ST_READY)
> return (-EIO);
>
> memset(scmd, 0, MAX_COMMAND_SIZE);
> if ((STp->device)->scsi_level < SCSI_2) {
> scmd[0] = QFA_REQUEST_BLOCK;
> scmd[4] = 3;
> } else {
> scmd[0] = READ_POSITION;
> if (!logical && !STp->scsi2_logical)
> scmd[1] = 1; <<<<<<<<<<<<<<
> }
>
> When called from the ioctl that the tell option uses the variable logical is
> passed in as 0 (from what I could see everything else sets it to 1). For a
> READ_POSITION the drive I'm using only supports 0, 6, or 8 in the service
> action field of the second byte:
>
I think you have not set the scsi2_logical option bit with mt or stinit or some
other tool.
The default of device-specific addresses is a historical mistake but we have to
live with
it. I don’t see this as a big problem because any user of current drives should
enable
some driver options anyway.
Thanks,
Kai
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html