[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#447755: CMS minidisk label format



Just for grins, I thought I'd give you the full mapping of the CMS volume label.
This is in s390 assembler language format:

ADTIDENT DS    CL4            LABEL IDENTIFIER ("CMS1")
ADTID    DS    CL6            VOLUME IDENTIFIER (VOLSER)
ADTVER   DS    CL2            VERSION LEVEL
ADTDBSIZ DS    F              DISK BLOCK SIZE
ADTDOP   DS    F              DISK ORIGIN POINTER
ADTCYL   DS    F              NUM OF FORMATTED CYL ON DISK
ADTMCYL  DS    F              MAX NUM FORMATTED CYL ON DISK
ADTNUM   DS    F              Number of formatted blocks
ADTUSED  DS    F              Number of blocks used
ADTFSTSZ DS    F              Size of FST
ADTNFST  DS    F              Number of FSTs per block
ADTDCRED DS    CL6            Disk creation date (yymmddhhmmss)
ADTFLGL  DS    X              Label flag byte
ADTCNTRY EQU   X'01'          Century for disk creation date
*                             (0=19, 1=20), corresponds to
*                             ADTDCRED.
         DS    CL1            RESERVED
ADTOFFST DS    F              DISK OFFSET WHEN RESERVED
ADTAMNB  DS    F              ALLOC MAP BLOCK WITH NEXT HOLE
ADTAMND  DS    F              DISP INTO HBLK DATA OF NEXT HOLE
ADTAMUP  DS    F              DISP INTO USER PART OF ALLOC MAP
ADTOFCNT DS    F              RESERVED
ADTSFNAM DS    CL8            RESERVED

That's 80 bytes.  The rest of the block is not used.

The most interesting field to Linux is ADTOFFST, which is
a 32-bit big-endian unsigned binary number that is zero if the
disk is non-reserved and non-zero if the disk is reserved.
If the disk is non-reserved, Linux assumes that the single implicit
partition starts at the block following the volume label, which
for a CKD DASD is the fourth physical block (block 3 counting from
zero), and ends at the end of the disk.  If the disk is reserved,
ADTOFFST is the starting block number (counting from zero) of the
single explicit partition created by the CMS RESERVE command.
The partition ends at the end of the disk.



Reply to: