]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dasd: use correct label location for diag fba disks
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Mon, 19 Jul 2010 07:22:35 +0000 (09:22 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:08:04 +0000 (18:08 -0500)
commitc8f7a02386859e42e02d10f05f8c641bb165d373
tree14a826a3dbeab6bffa3b48dd03a400704644813d
parent00a0f4383a9f15cec62905e25b97c4e76c001fb8
dasd: use correct label location for diag fba disks

commit cffab6bc5511cd6f67a60bf16b62de4267b68c4c upstream.

Partition boundary calculation fails for DASD FBA disks under the
following conditions:
- disk is formatted with CMS FORMAT with a blocksize of more than
  512 bytes
- all of the disk is reserved to a single CMS file using CMS RESERVE
- the disk is accessed using the DIAG mode of the DASD driver

Under these circumstances, the partition detection code tries to
read the CMS label block containing partition-relevant information
from logical block offset 1, while it is in fact located at physical
block offset 1.

Fix this problem by using the correct CMS label block location
depending on the device type as determined by the DASD SENSE ID
information.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/partitions/ibm.c