Peter Oberparleiter 2cc9637ce8 s390/dasd: Fix capacity calculation for large volumes
The DASD driver incorrectly limits the maximum number of blocks of ECKD
DASD volumes to 32 bit numbers. Volumes with a capacity greater than
2^32-1 blocks are incorrectly recognized as smaller volumes.

This results in the following volume capacity limits depending on the
formatted block size:

  BLKSIZE  MAX_GB   MAX_CYL
      512    2047   5843492
     1024    4095   8676701
     2048    8191  13634816
     4096   16383  23860929

The same problem occurs when a volume with more than 17895697 cylinders
is accessed in raw-track-access mode.

Fix this problem by adding an explicit type cast when calculating the
maximum number of blocks.

Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2019-03-29 07:23:44 +01:00
..
2019-03-09 16:53:47 -08:00
2019-03-23 10:14:42 -07:00
2019-03-06 09:41:12 -08:00
2019-03-16 13:05:32 -07:00
2019-03-14 09:11:54 -07:00
2019-03-09 14:57:08 -08:00
2019-03-06 14:18:59 -08:00
2019-03-15 14:37:46 -07:00
2019-03-08 10:02:58 -08:00
2019-03-10 13:16:37 -07:00
2019-03-07 08:59:26 -07:00
2019-03-16 12:36:39 -07:00
2019-03-10 11:54:48 -07:00
2019-03-10 11:54:48 -07:00
2019-03-09 15:53:03 -08:00
2019-03-16 13:05:32 -07:00
2019-03-16 12:36:39 -07:00
2019-03-10 11:54:48 -07:00
2019-03-10 10:17:23 -07:00
2019-03-08 08:23:15 -08:00
2019-03-14 09:00:06 -07:00
2019-03-12 09:46:32 -07:00
2019-03-09 14:57:08 -08:00
2019-03-09 14:45:54 -08:00
2019-03-16 12:51:50 -07:00
2019-03-06 09:41:12 -08:00
2019-03-14 09:11:54 -07:00
2019-03-07 12:56:26 -08:00
2019-03-10 12:47:57 -07:00
2019-03-15 14:22:59 -07:00
2019-03-11 11:22:15 -07:00
2019-03-10 12:29:52 -07:00