diff options
author | Peter Oberparleiter <oberpar@linux.ibm.com> | 2019-03-22 16:01:17 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-03-29 07:23:44 +0100 |
commit | 2cc9637ce825f3a9f51f8f78af7474e9e85bfa5f (patch) | |
tree | f50fa36ac4aa5167bce711f9f18c270cc85704c4 /drivers/xen | |
parent | s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) (diff) | |
download | linux-2cc9637ce825f3a9f51f8f78af7474e9e85bfa5f.tar.xz linux-2cc9637ce825f3a9f51f8f78af7474e9e85bfa5f.zip |
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>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions