OSDN Git Service
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.