OSDN Git Service

s390: make DIAG driver work for FBA DASD with block size > 512
authorStephen Powell <zlinuxman@wowway.com>
Thu, 28 Oct 2010 16:13:07 +0000 (18:13 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 23 Feb 2011 09:30:59 +0000 (10:30 +0100)
commitdb20944f8352f900d0d7eb6d78b367a7049151dd
tree028ea3e5a8105766fcc9c064e7a1631bf4ae4aa9
parenta4ca657a7ad4e19baf3a171f038764c48468e1ea
s390: make DIAG driver work for FBA DASD with block size > 512

In order to make the DIAG driver work for FBA DASD with a block
size greater than 512, I had to make a rather awkward patch to
C function vtoc_read_volume_label in libparted/labels/vtoc.c.
The "right" logic would be "If this is an FBA DASD device
using the DIAG driver, and the effective block size used by the
DIAG driver is greater than 512, then do it this way.  Else,
do it the normal way."  (Note that when using the FBA driver,
the effective block size is always 512, regardless of the CMS
logical block size stored in the volume label.  The DIAG driver,
on the other hand, honors the CMS logical block size.)

The problem is that the information needed to make that decision
has not been provided to the routine (via the parameter list).
So what I ended up doing is assuming the normal way, then if
I don't find a recognized volume label header (VOL1, LNX1,
or CMS1, in EBCDIC), then I assumed that it must be the special
case.  So in the special case I end up doing an unnecessary
read.  It's a kludge, but it works.
libparted/labels/dasd.c
libparted/labels/fdasd.c
libparted/labels/vtoc.c