diff mbox

What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning

Message ID alpine.LSU.2.11.1601291915010.22105@xnv.znxvfnen.cevingr (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Kai Mäkisara Jan. 29, 2016, 5:22 p.m. UTC
On Friday 2016-01-29 01:12, Seymour, Shane M wrote:

>Date: Fri, 29 Jan 2016 01:12:41
>From: "Seymour, Shane M" <shane.seymour@hpe.com>
>To: "\"Kai Mäkisara (Kolumbus)\"" <kai.makisara@kolumbus.fi>
>Cc: Laurence Oberman <loberman@redhat.com>,
>    Emmanuel Florac <eflorac@intellique.com>,
>    Laurence Oberman <oberman.l@gmail.com>,
>    "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
>Subject: RE: What partition should the MTMKPART argument specify? Was: Re: st
>    driver doesn't seem to grok LTO partitioning
>
>Hi Kai,
>
>$ pwd
>/sys/class/scsi_tape/st1/device
>$ cat scsi_level
>4
>
OK. The previous patch set the number of partition size descriptors to 
one for HP DATs only if the SCSI level was <= SCSI_2.

The patch below uses that logic for all drives that don't need FORMAT 
MEDIUM. For the drives needing FORMAT MEDIUM the value is set to 2. 
These drives include LTOs and other modern drives.

Thanks, Kai
---------------------------------8<----------------------------------

Comments

Seymour, Shane M Feb. 1, 2016, 6:31 a.m. UTC | #1
Hi Kai,

Thanks for the changes the HPE DAT72 DDS5 drive now works as expected:

# ./mt -f /dev/st1 stsetoption debug
# ./mt -f /dev/st1 stsetoption can-partitions
# ./mt -f /dev/st1 mkpartition 1000

[  980.241139] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[  980.241481] st 6:0:3:0: [st1] Mode 0 options: buffer writes: 1, async writes: 1, read ahead: 1
[  980.241487] st 6:0:3:0: [st1]     can bsr: 1, two FMs: 0, fast mteom: 0, auto lock: 0,
[  980.241490] st 6:0:3:0: [st1]     defs for wr: 0, no block limits: 0, partitions: 0, s2 log: 0
[  980.241493] st 6:0:3:0: [st1]     sysv: 0 nowait: 0 sili: 0 nowait_filemark: 0
[  980.241496] st 6:0:3:0: [st1]     debugging: 1
[  980.241502] st 6:0:3:0: [st1] Rewinding tape.
[  986.785288] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[  986.785658] st 6:0:3:0: [st1] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[  986.785663] st 6:0:3:0: [st1] Density 47, tape length: 0, drv buffer: 1
[  986.785666] st 6:0:3:0: [st1] Block size: 0, buffer size: 4096 (1 blocks).
[  986.785686] st 6:0:3:0: [st1] Mode 0 options: buffer writes: 1, async writes: 1, read ahead: 1
[  986.785690] st 6:0:3:0: [st1]     can bsr: 1, two FMs: 0, fast mteom: 0, auto lock: 0,
[  986.785693] st 6:0:3:0: [st1]     defs for wr: 0, no block limits: 0, partitions: 1, s2 log: 0
[  986.785696] st 6:0:3:0: [st1]     sysv: 0 nowait: 0 sili: 0 nowait_filemark: 0
[  986.785699] st 6:0:3:0: [st1]     debugging: 1
[  986.785703] st 6:0:3:0: [st1] Rewinding tape.
[  994.642650] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[  994.643219] st 6:0:3:0: [st1] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[  994.643225] st 6:0:3:0: [st1] Density 47, tape length: 0, drv buffer: 1
[  994.643229] st 6:0:3:0: [st1] Block size: 0, buffer size: 4096 (1 blocks).
[  994.643231] st 6:0:3:0: [st1] Updating partition number in status.
[  994.643681] st 6:0:3:0: [st1] Got tape pos. blk 0 part 0.
[  994.643699] st 6:0:3:0: [st1] Loading tape.
[  994.644655] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[  994.644972] st 6:0:3:0: [st1] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[  994.644976] st 6:0:3:0: [st1] Density 47, tape length: 0, drv buffer: 1
[  994.644980] st 6:0:3:0: [st1] Block size: 0, buffer size: 4096 (1 blocks).
[  994.645346] st 6:0:3:0: [st1] Partition page length is 10 bytes.
[  994.645352] st 6:0:3:0: [st1] PP: max 1, add 1, xdp 0, psum 02, pofmetc 0, rec 03, units 00, sizes: 1000 65535
[  994.645356] st 6:0:3:0: [st1] MP: 11 08 01 01 10 03 00 00 03 e8 ff ff
[  994.645359] st 6:0:3:0: [st1] psd_cnt 1, max.parts 1, nbr_parts 1
[  994.645362] st 6:0:3:0: [st1] Formatting tape with two partitions (1 = 1000 MB).
[  994.645366] st 6:0:3:0: [st1] Sent partition page length is 10 bytes. needs_format: 0
[  994.645370] st 6:0:3:0: [st1] PP: max 1, add 1, xdp 1, psum 02, pofmetc 0, rec 03, units 00, sizes: 1000 65535
[  994.645374] st 6:0:3:0: [st1] MP: 11 08 01 01 30 03 00 00 03 e8 ff ff
[ 1372.970312] st 6:0:3:0: [st1] Rewinding tape.

# ./mt -f /dev/st1 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x47 (DDS-5 or TR-5).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
# ./mt -f /dev/st1 setpartition 1
# ./mt -f /dev/st1 status
SCSI 2 tape drive:
File number=0, block number=0, partition=1.
Tape block size 0 bytes. Density code 0x47 (DDS-5 or TR-5).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

And since you can only set the size of partition 1 on those drives as expected using a negative size fails:

# ./mt -f /dev/st1 mkpartition -500
/dev/st1: Invalid argument

[ 3937.384419] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[ 3937.384710] st 6:0:3:0: [st1] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 3937.384715] st 6:0:3:0: [st1] Density 47, tape length: 0, drv buffer: 1
[ 3937.384718] st 6:0:3:0: [st1] Block size: 0, buffer size: 4096 (1 blocks).
[ 3937.384736] st 6:0:3:0: [st1] Loading tape.
[ 3937.385682] st 6:0:3:0: [st1] Block limits 1 - 16777215 bytes.
[ 3937.385983] st 6:0:3:0: [st1] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 3937.385988] st 6:0:3:0: [st1] Density 47, tape length: 0, drv buffer: 1
[ 3937.385991] st 6:0:3:0: [st1] Block size: 0, buffer size: 4096 (1 blocks).
[ 3937.386443] st 6:0:3:0: [st1] Partition page length is 10 bytes.
[ 3937.386450] st 6:0:3:0: [st1] PP: max 1, add 1, xdp 0, psum 02, pofmetc 0, rec 03, units 00, sizes: 1000 65535
[ 3937.386455] st 6:0:3:0: [st1] MP: 11 08 01 01 10 03 00 00 03 e8 ff ff
[ 3937.386577] st 6:0:3:0: [st1] Rewinding tape.

As expected LTO3 fails since it cannot be partitioned:

[ 4599.012299] st 5:0:1:0: [st0] Block limits 1 - 16777215 bytes.
[ 4599.014281] st 5:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 4599.014286] st 5:0:1:0: [st0] Density 44, tape length: 0, drv buffer: 1
[ 4599.014290] st 5:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
[ 4599.014356] st 5:0:1:0: [st0] Rewinding tape.
[ 4631.811295] st 5:0:1:0: [st0] Block limits 1 - 16777215 bytes.
[ 4631.813313] st 5:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 4631.813318] st 5:0:1:0: [st0] Density 44, tape length: 0, drv buffer: 1
[ 4631.813321] st 5:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
[ 4631.813342] st 5:0:1:0: [st0] Mode 0 options: buffer writes: 1, async writes: 1, read ahead: 1
[ 4631.813345] st 5:0:1:0: [st0]     can bsr: 1, two FMs: 0, fast mteom: 0, auto lock: 0,
[ 4631.813348] st 5:0:1:0: [st0]     defs for wr: 0, no block limits: 0, partitions: 1, s2 log: 0
[ 4631.813351] st 5:0:1:0: [st0]     sysv: 0 nowait: 0 sili: 0 nowait_filemark: 0
[ 4631.813354] st 5:0:1:0: [st0]     debugging: 1
[ 4631.813359] st 5:0:1:0: [st0] Rewinding tape.
[ 4648.170712] st 5:0:1:0: [st0] Block limits 1 - 16777215 bytes.
[ 4648.172774] st 5:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 4648.172779] st 5:0:1:0: [st0] Density 44, tape length: 0, drv buffer: 1
[ 4648.172783] st 5:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
[ 4648.172786] st 5:0:1:0: [st0] Updating partition number in status.
[ 4648.175584] st 5:0:1:0: [st0] Got tape pos. blk 0 part 0.
[ 4648.175604] st 5:0:1:0: [st0] Loading tape.
[ 4648.209689] st 5:0:1:0: [st0] Block limits 1 - 16777215 bytes.
[ 4648.212799] st 5:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
[ 4648.212804] st 5:0:1:0: [st0] Density 44, tape length: 0, drv buffer: 1
[ 4648.212808] st 5:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
[ 4648.215855] st 5:0:1:0: [st0] Partition page length is 10 bytes.
[ 4648.215861] st 5:0:1:0: [st0] PP: max 0, add 0, xdp 0, psum 03, pofmetc 0, rec 03, units 09, sizes: 400 65535
[ 4648.215866] st 5:0:1:0: [st0] MP: 11 08 00 00 18 03 09 00 01 90 ff ff
[ 4648.215869] st 5:0:1:0: [st0] psd_cnt 1, max.parts 0, nbr_parts 0
[ 4648.215872] st 5:0:1:0: [st0] Formatting tape with two partitions (1 = 1000 MB).
[ 4648.215875] st 5:0:1:0: [st0] Sent partition page length is 10 bytes. needs_format: 0
[ 4648.215879] st 5:0:1:0: [st0] PP: max 0, add 1, xdp 1, psum 03, pofmetc 0, rec 03, units 09, sizes: 65535 1
[ 4648.215883] st 5:0:1:0: [st0] MP: 11 08 00 01 38 03 09 00 ff ff 00 01
[ 4648.220140] st 5:0:1:0: [st0] Error: 8000002, cmd: 15 10 0 0 16 0
[ 4648.220145] st 5:0:1:0: [st0] Sense Key : Illegal Request [current]
[ 4648.220149] st 5:0:1:0: [st0] Add. Sense: Invalid field in parameter list
[ 4648.220153] st 5:0:1:0: [st0] Partitioning of tape failed.
[ 4648.220269] st 5:0:1:0: [st0] Rewinding tape.

I'm asking around again one final time to see if I can lay my hands on a LTO5 or greater drive so I can test LTO partitioning as well.

The only other thing I can think of (I'm not sure if this is an improvement or not) is if bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS] (max.parts and nbr_parts in the debug message) is zero just return -EINVAL unless you know of any take drives that report them both as 0 but can be partitioned? That is after this:

        DEBC_printk(STp, "psd_cnt %d, max.parts %d, nbr_parts %d\n",
                    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
                    bp[pgo + PP_OFF_NBR_ADD_PARTS]);

add (and also turn off the can-partitions option):

	if ((bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS]) == 0) {
		DEBC_printk(STp, "Drive not partitionable - max.parts+nbr_parts is 0\n");
		STp->can_partitions = 0;
		return -EINVAL;
	}

I'm not especially fussed if you don't want to add that though.

Thanks
Shane

> -----Original Message-----

> From: makisara@kai.makisara.private [mailto:makisara@kai.makisara.private]

> On Behalf Of Kai Makisara

> Sent: Saturday, January 30, 2016 4:22 AM

> To: Seymour, Shane M

> Cc: Laurence Oberman; Emmanuel Florac; Laurence Oberman; linux-

> scsi@vger.kernel.org

> Subject: RE: What partition should the MTMKPART argument specify? Was:

> Re: st driver doesn't seem to grok LTO partitioning

> 

> On Friday 2016-01-29 01:12, Seymour, Shane M wrote:

> 

> >Date: Fri, 29 Jan 2016 01:12:41

> >From: "Seymour, Shane M" <shane.seymour@hpe.com>

> >To: "\"Kai Mäkisara (Kolumbus)\"" <kai.makisara@kolumbus.fi>

> >Cc: Laurence Oberman <loberman@redhat.com>,

> >    Emmanuel Florac <eflorac@intellique.com>,

> >    Laurence Oberman <oberman.l@gmail.com>,

> >    "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>

> >Subject: RE: What partition should the MTMKPART argument specify? Was:

> Re: st

> >    driver doesn't seem to grok LTO partitioning

> >

> >Hi Kai,

> >

> >$ pwd

> >/sys/class/scsi_tape/st1/device

> >$ cat scsi_level

> >4

> >

> OK. The previous patch set the number of partition size descriptors to

> one for HP DATs only if the SCSI level was <= SCSI_2.

> 

> The patch below uses that logic for all drives that don't need FORMAT

> MEDIUM. For the drives needing FORMAT MEDIUM the value is set to 2.

> These drives include LTOs and other modern drives.

> 

> Thanks, Kai

> ---------------------------------8<----------------------------------

> --- ref/drivers/scsi/st.c	2015-12-21 18:54:05.068882001 +0200

> +++ new/drivers/scsi/st.c	2016-01-29 19:12:06.139738037 +0200

> @@ -9,7 +9,7 @@

>     Steve Hirsch, Andreas Koppenh"ofer, Michael Leodolter, Eyal Lebedinsky,

>     Michael Schaefer, J"org Weule, and Eric Youngdale.

> 

> -   Copyright 1992 - 2010 Kai Makisara

> +   Copyright 1992 - 2016 Kai Makisara

>     email Kai.Makisara@kolumbus.fi

> 

>     Some small formal changes - aeb, 950809

> @@ -17,7 +17,7 @@

>     Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs

> support

>   */

> 

> -static const char *verstr = "20101219";

> +static const char *verstr = "20160129";

> 

>  #include <linux/module.h>

> 

> @@ -3296,7 +3296,10 @@

>  #define PP_OFF_RESERVED        7

> 

>  #define PP_BIT_IDP             0x20

> +#define PP_BIT_FDP             0x80

>  #define PP_MSK_PSUM_MB         0x10

> +#define PP_MSK_PSUM_UNITS      0x18

> +#define PP_MSK_POFM            0x04

> 

>  /* Get the number of partitions on the tape. As a side effect reads the

>     mode page into the tape buffer. */

> @@ -3322,6 +3325,29 @@

>  }

> 

> 

> +static int format_medium(struct scsi_tape *STp, int format)

> +{

> +	int result = 0;

> +	int timeout = STp->long_timeout;

> +	unsigned char scmd[MAX_COMMAND_SIZE];

> +	struct st_request *SRpnt;

> +

> +	memset(scmd, 0, MAX_COMMAND_SIZE);

> +	scmd[0] = FORMAT_UNIT;

> +	scmd[2] = format;

> +	if (STp->immediate) {

> +		scmd[1] |= 1;		/* Don't wait for completion */

> +		timeout = STp->device->request_queue->rq_timeout;

> +	}

> +	DEBC_printk(STp, "Sending FORMAT MEDIUM\n");

> +	SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,

> +			   timeout, MAX_RETRIES, 1);

> +	if (!SRpnt)

> +		result = STp->buffer->syscall_result;

> +	return result;

> +}

> +

> +

>  /* Partition the tape into two partitions if size > 0 or one partition if

>     size == 0.

> 

> @@ -3340,11 +3366,16 @@

>     and 10 when 1 partition is defined (information from Eric Lee Green). This is

>     is acceptable also to some other old drives and enforced if the first

> partition

>     size field is used for the first additional partition size.

> +

> +   For drives that advertize SCSI-3 or newer, use the SSC-3 methods.

>   */

>  static int partition_tape(struct scsi_tape *STp, int size)

>  {

>  	int result;

> +	int target_partition;

> +	bool scsi3 = STp->device->scsi_level >= SCSI_3, needs_format = false;

>  	int pgo, psd_cnt, psdo;

> +	int psum = PP_MSK_PSUM_MB, units = 0;

>  	unsigned char *bp;

> 

>  	result = read_mode_page(STp, PART_PAGE, 0);

> @@ -3352,16 +3383,72 @@

>  		DEBC_printk(STp, "Can't read partition mode page.\n");

>  		return result;

>  	}

> +	target_partition = 1;

> +	if (size < 0) {

> +		target_partition = 0;

> +		size = -size;

> +	}

> +

>  	/* The mode page is in the buffer. Let's modify it and write it. */

>  	bp = (STp->buffer)->b_data;

>  	pgo = MODE_HEADER_LENGTH + bp[MH_OFF_BDESCS_LENGTH];

>  	DEBC_printk(STp, "Partition page length is %d bytes.\n",

>  		    bp[pgo + MP_OFF_PAGE_LENGTH] + 2);

> +	DEBC_printk(STp, "PP: max %u, add %u, xdp %u, psum %02x,

> pofmetc %u, "

> +		    "rec %02x, units %02x, sizes: %u %u\n",

> +		    bp[pgo + PP_OFF_MAX_ADD_PARTS],

> +		    bp[pgo + PP_OFF_NBR_ADD_PARTS],

> +		    (bp[pgo + PP_OFF_FLAGS] & 0xe0) >> 5,

> +		    (bp[pgo + PP_OFF_FLAGS] & 0x18) >> 3,

> +		    bp[pgo + PP_OFF_FLAGS] & 0x07,

> +		    bp[pgo + 5],

> +		    bp[pgo + PP_OFF_PART_UNITS],

> +		    bp[pgo + 8] * 256 + bp[pgo + 9],

> +		    bp[pgo + 10] * 256 + bp[pgo + 11]);

> +	DEBC_printk(STp,

> "MP: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n

> ",

> +		    bp[pgo], bp[pgo+1], bp[pgo+2], bp[pgo+3], bp[pgo+4],

> bp[pgo+5],

> +		    bp[pgo+6], bp[pgo+7], bp[pgo+8], bp[pgo+9], bp[pgo+10],

> bp[pgo+11]);

> 

>  	psd_cnt = (bp[pgo + MP_OFF_PAGE_LENGTH] + 2 -

> PART_PAGE_FIXED_LENGTH) / 2;

> +

> +	if (scsi3) {

> +		needs_format = (bp[pgo + PP_OFF_FLAGS] &

> PP_MSK_POFM) != 0;

> +		if (needs_format && size == 0) {

> +			/* No need to write the mode page when clearing

> partitioning */

> +			result = format_medium(STp, 0);

> +			goto out;

> +		}

> +		if (needs_format)  /* Leave the old value for HP DATs

> claiming SCSI_3 */

> +			psd_cnt = 2;

> +		if ((bp[pgo + PP_OFF_FLAGS] & PP_MSK_PSUM_UNITS) ==

> PP_MSK_PSUM_UNITS) {

> +			/* Use units scaling for large partitions if the device

> suggests

> +			   it and no precision lost. Required for IBM TS1140/50

> drives

> +			   that don't support MB units. */

> +			if (size >= 1000 && (size % 1000) == 0) {

> +				size /= 1000;

> +				psum = PP_MSK_PSUM_UNITS;

> +				units = 9; /* GB */

> +			}

> +		}

> +		/* Try it anyway if too large to specify in MB */

> +		if (psum == PP_MSK_PSUM_MB && size >= 65534) {

> +				size /= 1000;

> +				psum = PP_MSK_PSUM_UNITS;

> +				units = 9;  /* GB */

> +		}

> +	}

> +

> +	if (size >= 65535 ||  /* Does not fit into two bytes */

> +	    (target_partition == 0 && psd_cnt < 2)) {

> +		result = -EINVAL;

> +		goto out;

> +	}

> +

>  	psdo = pgo + PART_PAGE_FIXED_LENGTH;

> -	if (psd_cnt > bp[pgo + PP_OFF_MAX_ADD_PARTS]) {

> -		bp[psdo] = bp[psdo + 1] = 0xff;  /* Rest of the tape */

> +	/* The second condition is for HP DDS which use only one partition

> size

> +	   descriptor */

> +	if (target_partition > 0 && psd_cnt > bp[pgo +

> PP_OFF_MAX_ADD_PARTS]) {

> +		bp[psdo] = bp[psdo + 1] = 0xff;  /* Rest of the tape to

> partition 0 */

>  		psdo += 2;

>  	}

>  	memset(bp + psdo, 0, bp[pgo + PP_OFF_NBR_ADD_PARTS] * 2);

> @@ -3370,7 +3457,7 @@

>  		    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],

>  		    bp[pgo + PP_OFF_NBR_ADD_PARTS]);

> 

> -	if (size <= 0) {

> +	if (size == 0) {

>  		bp[pgo + PP_OFF_NBR_ADD_PARTS] = 0;

>  		if (psd_cnt <= bp[pgo + PP_OFF_MAX_ADD_PARTS])

>  		    bp[pgo + MP_OFF_PAGE_LENGTH] = 6;

> @@ -3378,22 +3465,54 @@

>  	} else {

>  		bp[psdo] = (size >> 8) & 0xff;

>  		bp[psdo + 1] = size & 0xff;

> +		if (target_partition == 0)

> +			bp[psdo + 2] = bp[psdo + 3] = 0xff;

>  		bp[pgo + 3] = 1;

>  		if (bp[pgo + MP_OFF_PAGE_LENGTH] < 8)

>  		    bp[pgo + MP_OFF_PAGE_LENGTH] = 8;

>  		DEBC_printk(STp, "Formatting tape with two partitions "

> -			    "(1 = %d MB).\n", size);

> +			    "(1 = %d MB).\n",

> +			    units > 0 ? size * 1000 : size);

>  	}

>  	bp[pgo + PP_OFF_PART_UNITS] = 0;

>  	bp[pgo + PP_OFF_RESERVED] = 0;

> -	bp[pgo + PP_OFF_FLAGS] = PP_BIT_IDP | PP_MSK_PSUM_MB;

> +	if (size != 1 || units != 0) {

> +		bp[pgo + PP_OFF_FLAGS] = PP_BIT_IDP | psum |

> +			(bp[pgo + PP_OFF_FLAGS] & 0x07);

> +		bp[pgo + PP_OFF_PART_UNITS] = units;

> +	} else

> +		bp[pgo + PP_OFF_FLAGS] = PP_BIT_FDP |

> +			(bp[pgo + PP_OFF_FLAGS] & 0x1f);

> +	bp[pgo + MP_OFF_PAGE_LENGTH] = 6 + psd_cnt * 2;

> +

> +	DEBC_printk(STp, "Sent partition page length is %d bytes.

> needs_format: %d\n",

> +		    bp[pgo + MP_OFF_PAGE_LENGTH] + 2, needs_format);

> +	DEBC_printk(STp, "PP: max %u, add %u, xdp %u, psum %02x,

> pofmetc %u, "

> +		    "rec %02x, units %02x, sizes: %u %u\n",

> +		    bp[pgo + PP_OFF_MAX_ADD_PARTS],

> +		    bp[pgo + PP_OFF_NBR_ADD_PARTS],

> +		    (bp[pgo + PP_OFF_FLAGS] & 0xe0) >> 5,

> +		    (bp[pgo + PP_OFF_FLAGS] & 0x18) >> 3,

> +		    bp[pgo + PP_OFF_FLAGS] & 0x07,

> +		    bp[pgo + 5],

> +		    bp[pgo + PP_OFF_PART_UNITS],

> +		    bp[pgo + 8] * 256 + bp[pgo + 9],

> +		    bp[pgo + 10] * 256 + bp[pgo + 11]);

> +	DEBC_printk(STp,

> "MP: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n

> ",

> +		    bp[pgo], bp[pgo+1], bp[pgo+2], bp[pgo+3], bp[pgo+4],

> bp[pgo+5],

> +		    bp[pgo+6], bp[pgo+7], bp[pgo+8], bp[pgo+9], bp[pgo+10],

> bp[pgo+11]);

> 

>  	result = write_mode_page(STp, PART_PAGE, 1);

> +

> +	if (!result && needs_format)

> +		result = format_medium(STp, 1);

> +

>  	if (result) {

>  		st_printk(KERN_INFO, STp, "Partitioning of tape failed.\n");

>  		result = (-EIO);

>  	}

> 

> +out:

>  	return result;

>  }

>  


> @@ -3570,7 +3689,7 @@

>  				retval = (-EINVAL);

>  				goto out;

>  			}

> -			if ((i = st_int_ioctl(STp, MTREW, 0)) < 0 ||

> +			if ((i = do_load_unload(STp, file, 1)) < 0 ||

>  			    (i = partition_tape(STp, mtc.mt_count)) < 0) {

>  				retval = i;

>  				goto out;

> @@ -3581,7 +3700,7 @@

>  				STp->ps[i].last_block_valid = 0;

>  			}

>  			STp->partition = STp->new_partition = 0;

> -			STp->nbr_partitions = 1;	/* Bad guess ?-) */

> +			STp->nbr_partitions = mtc.mt_count > 0 ? 2 : 1;

>  			STps->drv_block = STps->drv_file = 0;

>  			retval = 0;

>  			goto out;
Kai Mäkisara Feb. 1, 2016, 6:43 p.m. UTC | #2
> On 1.2.2016, at 8.31, Seymour, Shane M <shane.seymour@hpe.com> wrote:
> 
> Hi Kai,
> 
> Thanks for the changes the HPE DAT72 DDS5 drive now works as expected:
> 
Good. Thanks for testing.

...
> 
> I'm asking around again one final time to see if I can lay my hands on a LTO5 or greater drive so I can test LTO partitioning as well.
> 
> The only other thing I can think of (I'm not sure if this is an improvement or not) is if bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS] (max.parts and nbr_parts in the debug message) is zero just return -EINVAL unless you know of any take drives that report them both as 0 but can be partitioned? That is after this:
> 
>        DEBC_printk(STp, "psd_cnt %d, max.parts %d, nbr_parts %d\n",
>                    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
>                    bp[pgo + PP_OFF_NBR_ADD_PARTS]);
> 
> add (and also turn off the can-partitions option):
> 
> 	if ((bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS]) == 0) {
> 		DEBC_printk(STp, "Drive not partitionable - max.parts+nbr_parts is 0\n");
> 		STp->can_partitions = 0;
> 		return -EINVAL;
> 	}
> 
> I'm not especially fussed if you don't want to add that though.
> 
I thought about a test like this (only test maximum number) but decided not to add it. The reason was that
I did not want to change anything that has worked before. I quite trust that the current drives return sense
data instead of crashing and the end result for the user would be the same. However, one can argue that
returning EINVAL is better than EIO but does the user notice? If the common opinion is that a test like this
should be added, I am not against it. It can be added to the code for SCSI >=3 where it does not risk
anything for the old drives.

IMHO, can_partitions should not be cleared based on the test. For example, trying to partition a LTO-4 tape
in a LTO-5 drive should not disable partitioning. (The mode page should return zero as maximum number of
partitions when a LTO-4 tape is inserted.)

Thanks,
Kai

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurence Oberman Feb. 1, 2016, 7:02 p.m. UTC | #3
The new patch did not work for me, but I chatted with Shane and I have his mt version. 
I will update my DAT to same firmware or newer than his and provide a second tested by.
I also expect my LTO5 to show up this week so will be ready for that.

Thanks everyone for keeping tapes alive

Laurence Oberman
Principal Software Maintenance Engineer
Red Hat Global Support Services

----- Original Message -----
From: "Kai Mäkisara (Kolumbus)" <kai.makisara@kolumbus.fi>
To: "Shane M Seymour" <shane.seymour@hpe.com>
Cc: "Laurence Oberman" <loberman@redhat.com>, "Emmanuel Florac" <eflorac@intellique.com>, "Laurence Oberman" <oberman.l@gmail.com>, linux-scsi@vger.kernel.org
Sent: Monday, February 1, 2016 1:43:26 PM
Subject: Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning


> On 1.2.2016, at 8.31, Seymour, Shane M <shane.seymour@hpe.com> wrote:
> 
> Hi Kai,
> 
> Thanks for the changes the HPE DAT72 DDS5 drive now works as expected:
> 
Good. Thanks for testing.

...
> 
> I'm asking around again one final time to see if I can lay my hands on a LTO5 or greater drive so I can test LTO partitioning as well.
> 
> The only other thing I can think of (I'm not sure if this is an improvement or not) is if bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS] (max.parts and nbr_parts in the debug message) is zero just return -EINVAL unless you know of any take drives that report them both as 0 but can be partitioned? That is after this:
> 
>        DEBC_printk(STp, "psd_cnt %d, max.parts %d, nbr_parts %d\n",
>                    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
>                    bp[pgo + PP_OFF_NBR_ADD_PARTS]);
> 
> add (and also turn off the can-partitions option):
> 
> 	if ((bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS]) == 0) {
> 		DEBC_printk(STp, "Drive not partitionable - max.parts+nbr_parts is 0\n");
> 		STp->can_partitions = 0;
> 		return -EINVAL;
> 	}
> 
> I'm not especially fussed if you don't want to add that though.
> 
I thought about a test like this (only test maximum number) but decided not to add it. The reason was that
I did not want to change anything that has worked before. I quite trust that the current drives return sense
data instead of crashing and the end result for the user would be the same. However, one can argue that
returning EINVAL is better than EIO but does the user notice? If the common opinion is that a test like this
should be added, I am not against it. It can be added to the code for SCSI >=3 where it does not risk
anything for the old drives.

IMHO, can_partitions should not be cleared based on the test. For example, trying to partition a LTO-4 tape
in a LTO-5 drive should not disable partitioning. (The mode page should return zero as maximum number of
partitions when a LTO-4 tape is inserted.)

Thanks,
Kai

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Seymour, Shane M Feb. 1, 2016, 10:59 p.m. UTC | #4
Hi Kai,

> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
> owner@vger.kernel.org] On Behalf Of "Kai Mäkisara (Kolumbus)"
> Sent: Tuesday, February 02, 2016 5:43 AM
> To: Seymour, Shane M
> Cc: Laurence Oberman; Emmanuel Florac; Laurence Oberman; linux-
> scsi@vger.kernel.org
> Subject: Re: What partition should the MTMKPART argument specify? Was:
> Re: st driver doesn't seem to grok LTO partitioning
> 
> 
> > On 1.2.2016, at 8.31, Seymour, Shane M <shane.seymour@hpe.com>
> wrote:
> >
> > Hi Kai,
> >
> > Thanks for the changes the HPE DAT72 DDS5 drive now works as expected:
> >
> Good. Thanks for testing.
> 
> ...
> >
> > I'm asking around again one final time to see if I can lay my hands on a LTO5
> or greater drive so I can test LTO partitioning as well.
> >
> > The only other thing I can think of (I'm not sure if this is an improvement or
> not) is if bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo +
> PP_OFF_NBR_ADD_PARTS] (max.parts and nbr_parts in the debug message)
> is zero just return -EINVAL unless you know of any take drives that report
> them both as 0 but can be partitioned? That is after this:
> >
> >        DEBC_printk(STp, "psd_cnt %d, max.parts %d, nbr_parts %d\n",
> >                    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
> >                    bp[pgo + PP_OFF_NBR_ADD_PARTS]);
> >
> > add (and also turn off the can-partitions option):
> >
> > 	if ((bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo +
> PP_OFF_NBR_ADD_PARTS]) == 0) {
> > 		DEBC_printk(STp, "Drive not partitionable -
> max.parts+nbr_parts is 0\n");
> > 		STp->can_partitions = 0;
> > 		return -EINVAL;
> > 	}
> >
> > I'm not especially fussed if you don't want to add that though.
> >
> I thought about a test like this (only test maximum number) but decided not
> to add it. The reason was that I did not want to change anything that has
> worked before. I quite trust that the current drives return sense data instead
> of crashing and the end result for the user would be the same. However, one
> can argue that returning EINVAL is better than EIO but does the user notice?
> If the common opinion is that a test like this should be added, I am not
> against it. It can be added to the code for SCSI >=3 where it does not risk
> anything for the old drives.
> 
> IMHO, can_partitions should not be cleared based on the test. For example,
> trying to partition a LTO-4 tape in a LTO-5 drive should not disable partitioning.
> (The mode page should return zero as maximum number of partitions when
> a LTO-4 tape is inserted.)

No problem, I didn't think of the case where you have a non-partitionable tape in
a drive that can do partitions. That case should have been obvious to me.

I may be able to lay my hands on a LTO5+ drive (only a small chance). Someone in
the US is checking is checking for me and will hook it up to the system I use for
testing tape stuff for me. I'll only have it for about a week if I'm able to get it.

Thanks
Shane

> 
> Thanks,
> Kai
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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gICAgICAg
ICAgICAgICAgICAgICAgIGJwW3BzZG8gKyAyXSA9IGJwW3BzZG8gKyAzXSA9IDB4ZmY7DQogICAg
ICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBicFtwc2RvICsgMl0gPSAoc2l6ZSA+PiA4KSAmIDB4ZmY7DQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIGJwW3BzZG8gKyAzXSA9IHNpemUgJiAweGZmOw0KICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBicFtwc2RvXSA9IGJwW3BzZG8gKyAxXSA9IDB4ZmY7DQogICAg
ICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfSBlbHNlIHsNCiAgICAgICAg
ICAgICAgICAgICAgICAgIGJwW3BzZG9dID0gKHNpemUgPj4gOCkgJiAweGZmOw0KICAgICAgICAg
ICAgICAgICAgICAgICAgYnBbcHNkbyArIDFdID0gc2l6ZSAmIDB4ZmY7DQogICAgICAgICAgICAg
ICAgICAgICAgICBpZiAodGFyZ2V0X3BhcnRpdGlvbiA9PSAwKQ0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBicFtwc2RvICsgMl0gPSBicFtwc2RvICsgM10gPSAweGZmOw0KICAgICAg
ICAgICAgICAgIH0NCg0KWW91IG1heSBiZSBhYmxlIHRvIHRoaW5rIG9mIGEgYmV0dGVyIGNvbmRp
dGlvbiB0aGF0IHdlIGNhbiBndWFyYW50ZWUgd2lsbCB3b3JrIHdpdGggb3RoZXIgZHJpdmVzIGFu
ZCBzdGlsbCBub3QgY2F1c2UgaXNzdWVzIGZvciBERFMgYnV0IGZvciBteSBIUEUgRERTIGFuZCBM
VE82IGRyaXZlcyB0aGF0IGZpcnN0IHRlc3Qgd29ya3Mgc2luY2UgSFBFIEREUyBkcml2ZXMgb25s
eSBoYXZlIGEgcGFydGl0aW9uIGZvcm1hdCBtb2RlIHBhZ2UgbG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UgcGF0Y2guIElmIHJlcXVpcmVkIGZlZWwgZnJlZSB0byBjaGFuZ2Ug
aXQgYXMgbmVlZGVkLiBJJ2xsIHJldGVzdCBhIGNvbnNvbGlkYXRlZCB2ZXJzaW9uIG9mIHRoZSBw
YXRjaCBpZiB5b3UgYWRkIHRoZSBjaGFuZ2VzIGFuZCBzZW5kIGl0IG91dC4NCg0KTGF1cmVuY2Us
IHdoZW4geW91IGdldCB5b3VyIExUTyBkcml2ZSB0ZXN0IHdpdGhvdXQgbXkgY2hhbmdlcyBpbiB0
byBtYWtlIHN1cmUgeW91IHNlZSB0aGUgc2FtZSBpc3N1ZSBhbmQgdGhlbiBpZiB5b3UgZG8gdGVz
dCB3aXRoIHRoZSBjaGFuZ2VzIEkgYWRkZWQgYWJvdmUuIFRoYXQncyBqdXN0IHRvIGRvdWJsZSBj
aGVjayB0aGF0IHRoZXJlJ3Mgbm90aGluZyB3cm9uZyB3aXRoIG15IHNldHVwIGFuZCB0aGUgY29k
ZSBjaGFuZ2VzIGFyZSByZXF1aXJlZC4NCg0KVGhhbmtzDQpTaGFuZQ0K
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurence Oberman Feb. 3, 2016, 3:40 a.m. UTC | #6
Hello

Finally got my firmware on my DAT updated.
Using Kai's latest patch I validated the patch on my DAT driver as well
Thanks to Shane for providing the correct mt code, as that was also one of my problems besides firmware.

[root@srp-server mt-st-1.1-patched]# ./mt -f /dev/st0 stsetoption can-partitions
[root@srp-server mt-st-1.1-patched]# ./mt -f /dev/st0 mkpartition 1000

Took almost 6 minutes to partition this old DDS

Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0] Density 47, tape length: 0, drv buffer: 1
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0] Mode 0 options: buffer writes: 1, async writes: 1, read ahead: 1
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0]     can bsr: 1, two FMs: 0, fast mteom: 0, auto lock: 0,
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0]     defs for wr: 0, no block limits: 0, partitions: 1, s2 log: 0
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0]     sysv: 0 nowait: 0 sili: 0 nowait_filemark: 0
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0]     debugging: 1
Feb 02 22:25:10 srp-server kernel: st 6:0:1:0: [st0] Rewinding tape.

Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Block limits 1 - 16777215 bytes.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Density 47, tape length: 0, drv buffer: 1
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Updating partition number in status.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Got tape pos. blk 0 part 0.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Loading tape.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Error: 8000002, cmd: 0 0 0 0 0 0
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Sense Key : Unit Attention [current] 
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Add. Sense: Not ready to ready change, medium may have changed
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Block limits 1 - 16777215 bytes.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Mode sense. Length 11, medium 0, WBS 10, BLL 8
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Density 47, tape length: 0, drv buffer: 1
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Block size: 0, buffer size: 4096 (1 blocks).
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Partition page length is 10 bytes.
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] PP: max 1, add 0, xdp 0, psum 02, pofmetc 0, rec 03, units 00, sizes: 0 65535
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] MP: 11 08 01 00 10 03 00 00 00 00 ff ff
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] psd_cnt 1, max.parts 1, nbr_parts 0
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Formatting tape with two partitions (1 = 1000 MB).
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] Sent partition page length is 10 bytes. needs_format: 0
Feb 02 22:25:24 srp-server kernel: st 6:0:1:0: [st0] PP: max 1, add 1, xdp 1, psum 02, pofmetc 0, rec 03, units 00, sizes: 1000 65535
Feb 02 22:31:45 srp-server kernel: st 6:0:1:0: [st0] Rewinding tape.

I will retest with Shane's latest additions he just sent after first testing with Kai's latest patch on my LTO5.
(here's hoping I dont have to update the f/w on that one)


Laurence Oberman
Principal Software Maintenance Engineer
Red Hat Global Support Services

----- Original Message -----
From: "Kai Mäkisara (Kolumbus)" <kai.makisara@kolumbus.fi>
To: "Shane M Seymour" <shane.seymour@hpe.com>
Cc: "Laurence Oberman" <loberman@redhat.com>, "Emmanuel Florac" <eflorac@intellique.com>, "Laurence Oberman" <oberman.l@gmail.com>, linux-scsi@vger.kernel.org
Sent: Monday, February 1, 2016 1:43:26 PM
Subject: Re: What partition should the MTMKPART argument specify? Was: Re: st driver doesn't seem to grok LTO partitioning


> On 1.2.2016, at 8.31, Seymour, Shane M <shane.seymour@hpe.com> wrote:
> 
> Hi Kai,
> 
> Thanks for the changes the HPE DAT72 DDS5 drive now works as expected:
> 
Good. Thanks for testing.

...
> 
> I'm asking around again one final time to see if I can lay my hands on a LTO5 or greater drive so I can test LTO partitioning as well.
> 
> The only other thing I can think of (I'm not sure if this is an improvement or not) is if bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS] (max.parts and nbr_parts in the debug message) is zero just return -EINVAL unless you know of any take drives that report them both as 0 but can be partitioned? That is after this:
> 
>        DEBC_printk(STp, "psd_cnt %d, max.parts %d, nbr_parts %d\n",
>                    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
>                    bp[pgo + PP_OFF_NBR_ADD_PARTS]);
> 
> add (and also turn off the can-partitions option):
> 
> 	if ((bp[pgo + PP_OFF_MAX_ADD_PARTS] + bp[pgo + PP_OFF_NBR_ADD_PARTS]) == 0) {
> 		DEBC_printk(STp, "Drive not partitionable - max.parts+nbr_parts is 0\n");
> 		STp->can_partitions = 0;
> 		return -EINVAL;
> 	}
> 
> I'm not especially fussed if you don't want to add that though.
> 
I thought about a test like this (only test maximum number) but decided not to add it. The reason was that
I did not want to change anything that has worked before. I quite trust that the current drives return sense
data instead of crashing and the end result for the user would be the same. However, one can argue that
returning EINVAL is better than EIO but does the user notice? If the common opinion is that a test like this
should be added, I am not against it. It can be added to the code for SCSI >=3 where it does not risk
anything for the old drives.

IMHO, can_partitions should not be cleared based on the test. For example, trying to partition a LTO-4 tape
in a LTO-5 drive should not disable partitioning. (The mode page should return zero as maximum number of
partitions when a LTO-4 tape is inserted.)

Thanks,
Kai

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- ref/drivers/scsi/st.c	2015-12-21 18:54:05.068882001 +0200
+++ new/drivers/scsi/st.c	2016-01-29 19:12:06.139738037 +0200
@@ -9,7 +9,7 @@ 
    Steve Hirsch, Andreas Koppenh"ofer, Michael Leodolter, Eyal Lebedinsky,
    Michael Schaefer, J"org Weule, and Eric Youngdale.
 
-   Copyright 1992 - 2010 Kai Makisara
+   Copyright 1992 - 2016 Kai Makisara
    email Kai.Makisara@kolumbus.fi
 
    Some small formal changes - aeb, 950809
@@ -17,7 +17,7 @@ 
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static const char *verstr = "20101219";
+static const char *verstr = "20160129";
 
 #include <linux/module.h>
 
@@ -3296,7 +3296,10 @@ 
 #define PP_OFF_RESERVED        7
 
 #define PP_BIT_IDP             0x20
+#define PP_BIT_FDP             0x80
 #define PP_MSK_PSUM_MB         0x10
+#define PP_MSK_PSUM_UNITS      0x18
+#define PP_MSK_POFM            0x04
 
 /* Get the number of partitions on the tape. As a side effect reads the
    mode page into the tape buffer. */
@@ -3322,6 +3325,29 @@ 
 }
 
 
+static int format_medium(struct scsi_tape *STp, int format)
+{
+	int result = 0;
+	int timeout = STp->long_timeout;
+	unsigned char scmd[MAX_COMMAND_SIZE];
+	struct st_request *SRpnt;
+
+	memset(scmd, 0, MAX_COMMAND_SIZE);
+	scmd[0] = FORMAT_UNIT;
+	scmd[2] = format;
+	if (STp->immediate) {
+		scmd[1] |= 1;		/* Don't wait for completion */
+		timeout = STp->device->request_queue->rq_timeout;
+	}
+	DEBC_printk(STp, "Sending FORMAT MEDIUM\n");
+	SRpnt = st_do_scsi(NULL, STp, scmd, 0, DMA_NONE,
+			   timeout, MAX_RETRIES, 1);
+	if (!SRpnt)
+		result = STp->buffer->syscall_result;
+	return result;
+}
+
+
 /* Partition the tape into two partitions if size > 0 or one partition if
    size == 0.
 
@@ -3340,11 +3366,16 @@ 
    and 10 when 1 partition is defined (information from Eric Lee Green). This is
    is acceptable also to some other old drives and enforced if the first partition
    size field is used for the first additional partition size.
+
+   For drives that advertize SCSI-3 or newer, use the SSC-3 methods.
  */
 static int partition_tape(struct scsi_tape *STp, int size)
 {
 	int result;
+	int target_partition;
+	bool scsi3 = STp->device->scsi_level >= SCSI_3, needs_format = false;
 	int pgo, psd_cnt, psdo;
+	int psum = PP_MSK_PSUM_MB, units = 0;
 	unsigned char *bp;
 
 	result = read_mode_page(STp, PART_PAGE, 0);
@@ -3352,16 +3383,72 @@ 
 		DEBC_printk(STp, "Can't read partition mode page.\n");
 		return result;
 	}
+	target_partition = 1;
+	if (size < 0) {
+		target_partition = 0;
+		size = -size;
+	}
+
 	/* The mode page is in the buffer. Let's modify it and write it. */
 	bp = (STp->buffer)->b_data;
 	pgo = MODE_HEADER_LENGTH + bp[MH_OFF_BDESCS_LENGTH];
 	DEBC_printk(STp, "Partition page length is %d bytes.\n",
 		    bp[pgo + MP_OFF_PAGE_LENGTH] + 2);
+	DEBC_printk(STp, "PP: max %u, add %u, xdp %u, psum %02x, pofmetc %u, "
+		    "rec %02x, units %02x, sizes: %u %u\n",
+		    bp[pgo + PP_OFF_MAX_ADD_PARTS],
+		    bp[pgo + PP_OFF_NBR_ADD_PARTS],
+		    (bp[pgo + PP_OFF_FLAGS] & 0xe0) >> 5,
+		    (bp[pgo + PP_OFF_FLAGS] & 0x18) >> 3,
+		    bp[pgo + PP_OFF_FLAGS] & 0x07,
+		    bp[pgo + 5],
+		    bp[pgo + PP_OFF_PART_UNITS],
+		    bp[pgo + 8] * 256 + bp[pgo + 9],
+		    bp[pgo + 10] * 256 + bp[pgo + 11]);
+	DEBC_printk(STp, "MP: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+		    bp[pgo], bp[pgo+1], bp[pgo+2], bp[pgo+3], bp[pgo+4], bp[pgo+5],
+		    bp[pgo+6], bp[pgo+7], bp[pgo+8], bp[pgo+9], bp[pgo+10], bp[pgo+11]);
 
 	psd_cnt = (bp[pgo + MP_OFF_PAGE_LENGTH] + 2 - PART_PAGE_FIXED_LENGTH) / 2;
+
+	if (scsi3) {
+		needs_format = (bp[pgo + PP_OFF_FLAGS] & PP_MSK_POFM) != 0;
+		if (needs_format && size == 0) {
+			/* No need to write the mode page when clearing partitioning */
+			result = format_medium(STp, 0);
+			goto out;
+		}
+		if (needs_format)  /* Leave the old value for HP DATs claiming SCSI_3 */
+			psd_cnt = 2;
+		if ((bp[pgo + PP_OFF_FLAGS] & PP_MSK_PSUM_UNITS) == PP_MSK_PSUM_UNITS) {
+			/* Use units scaling for large partitions if the device suggests
+			   it and no precision lost. Required for IBM TS1140/50 drives
+			   that don't support MB units. */
+			if (size >= 1000 && (size % 1000) == 0) {
+				size /= 1000;
+				psum = PP_MSK_PSUM_UNITS;
+				units = 9; /* GB */
+			}
+		}
+		/* Try it anyway if too large to specify in MB */
+		if (psum == PP_MSK_PSUM_MB && size >= 65534) {
+				size /= 1000;
+				psum = PP_MSK_PSUM_UNITS;
+				units = 9;  /* GB */
+		}
+	}
+
+	if (size >= 65535 ||  /* Does not fit into two bytes */
+	    (target_partition == 0 && psd_cnt < 2)) {
+		result = -EINVAL;
+		goto out;
+	}
+
 	psdo = pgo + PART_PAGE_FIXED_LENGTH;
-	if (psd_cnt > bp[pgo + PP_OFF_MAX_ADD_PARTS]) {
-		bp[psdo] = bp[psdo + 1] = 0xff;  /* Rest of the tape */
+	/* The second condition is for HP DDS which use only one partition size
+	   descriptor */
+	if (target_partition > 0 && psd_cnt > bp[pgo + PP_OFF_MAX_ADD_PARTS]) {
+		bp[psdo] = bp[psdo + 1] = 0xff;  /* Rest of the tape to partition 0 */
 		psdo += 2;
 	}
 	memset(bp + psdo, 0, bp[pgo + PP_OFF_NBR_ADD_PARTS] * 2);
@@ -3370,7 +3457,7 @@ 
 		    psd_cnt, bp[pgo + PP_OFF_MAX_ADD_PARTS],
 		    bp[pgo + PP_OFF_NBR_ADD_PARTS]);
 
-	if (size <= 0) {
+	if (size == 0) {
 		bp[pgo + PP_OFF_NBR_ADD_PARTS] = 0;
 		if (psd_cnt <= bp[pgo + PP_OFF_MAX_ADD_PARTS])
 		    bp[pgo + MP_OFF_PAGE_LENGTH] = 6;
@@ -3378,22 +3465,54 @@ 
 	} else {
 		bp[psdo] = (size >> 8) & 0xff;
 		bp[psdo + 1] = size & 0xff;
+		if (target_partition == 0)
+			bp[psdo + 2] = bp[psdo + 3] = 0xff;
 		bp[pgo + 3] = 1;
 		if (bp[pgo + MP_OFF_PAGE_LENGTH] < 8)
 		    bp[pgo + MP_OFF_PAGE_LENGTH] = 8;
 		DEBC_printk(STp, "Formatting tape with two partitions "
-			    "(1 = %d MB).\n", size);
+			    "(1 = %d MB).\n",
+			    units > 0 ? size * 1000 : size);
 	}
 	bp[pgo + PP_OFF_PART_UNITS] = 0;
 	bp[pgo + PP_OFF_RESERVED] = 0;
-	bp[pgo + PP_OFF_FLAGS] = PP_BIT_IDP | PP_MSK_PSUM_MB;
+	if (size != 1 || units != 0) {
+		bp[pgo + PP_OFF_FLAGS] = PP_BIT_IDP | psum |
+			(bp[pgo + PP_OFF_FLAGS] & 0x07);
+		bp[pgo + PP_OFF_PART_UNITS] = units;
+	} else
+		bp[pgo + PP_OFF_FLAGS] = PP_BIT_FDP |
+			(bp[pgo + PP_OFF_FLAGS] & 0x1f);
+	bp[pgo + MP_OFF_PAGE_LENGTH] = 6 + psd_cnt * 2;
+
+	DEBC_printk(STp, "Sent partition page length is %d bytes. needs_format: %d\n",
+		    bp[pgo + MP_OFF_PAGE_LENGTH] + 2, needs_format);
+	DEBC_printk(STp, "PP: max %u, add %u, xdp %u, psum %02x, pofmetc %u, "
+		    "rec %02x, units %02x, sizes: %u %u\n",
+		    bp[pgo + PP_OFF_MAX_ADD_PARTS],
+		    bp[pgo + PP_OFF_NBR_ADD_PARTS],
+		    (bp[pgo + PP_OFF_FLAGS] & 0xe0) >> 5,
+		    (bp[pgo + PP_OFF_FLAGS] & 0x18) >> 3,
+		    bp[pgo + PP_OFF_FLAGS] & 0x07,
+		    bp[pgo + 5],
+		    bp[pgo + PP_OFF_PART_UNITS],
+		    bp[pgo + 8] * 256 + bp[pgo + 9],
+		    bp[pgo + 10] * 256 + bp[pgo + 11]);
+	DEBC_printk(STp, "MP: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+		    bp[pgo], bp[pgo+1], bp[pgo+2], bp[pgo+3], bp[pgo+4], bp[pgo+5],
+		    bp[pgo+6], bp[pgo+7], bp[pgo+8], bp[pgo+9], bp[pgo+10], bp[pgo+11]);
 
 	result = write_mode_page(STp, PART_PAGE, 1);
+
+	if (!result && needs_format)
+		result = format_medium(STp, 1);
+
 	if (result) {
 		st_printk(KERN_INFO, STp, "Partitioning of tape failed.\n");
 		result = (-EIO);
 	}
 
+out:
 	return result;
 }
 
@@ -3570,7 +3689,7 @@ 
 				retval = (-EINVAL);
 				goto out;
 			}
-			if ((i = st_int_ioctl(STp, MTREW, 0)) < 0 ||
+			if ((i = do_load_unload(STp, file, 1)) < 0 ||
 			    (i = partition_tape(STp, mtc.mt_count)) < 0) {
 				retval = i;
 				goto out;
@@ -3581,7 +3700,7 @@ 
 				STp->ps[i].last_block_valid = 0;
 			}
 			STp->partition = STp->new_partition = 0;
-			STp->nbr_partitions = 1;	/* Bad guess ?-) */
+			STp->nbr_partitions = mtc.mt_count > 0 ? 2 : 1;
 			STps->drv_block = STps->drv_file = 0;
 			retval = 0;
 			goto out;