> I'm sorry, but I have absolutely no idea what this
> means.  
> 
> From the rationale it sounds like s390 stashes some kind of
> label or
> bootable area at the end of a minidisk, which is visible to
> the Linux
> program accessing the device file, and that mke2fs is
> supposed to
> somehow recognize the RECOMP area (how?), figure out how
> big is it
> (how?) and when mke2fs is not given a filesystem size, to
> pick by
> default a new filesystem size which hdoesn't overwrite
> the RECOMP
> area.
> 
> Did I guess this correctly?  If so, you're going to
> have to tell me
> how to do this, or better yet, supply code (patches) which
> does this.

You got it right.  In the CMS label record for an ECKD DASD minidisk, there
are two fields of interest: ADTCYL and ADTMCYL.  ADTMCYL is the total size
of the minidisk in cylinders, including the RECOMP area, if there is one.
ADTCYL is the number of cylinders used by the filesystem.  Normally, these
two values are the same.  But if the minidisk has been formatted with the
RECOMP option, the two values will be different.  ADTCYL will be less than
ADTMCYL.  The difference will be the size of the RECOMP area, in cylinders.
I'm not a C programmer, but I found this structure mapping on the internet
at http://people.redhat.com/zaitcev/linux/linux-2.4.18-pre7-cmsfs.diff.
Perhaps it will be helpful to you.  I suspect, though I haven't looked at the 
source code, that there is probably already a similar data structure
defined for mke2fs that it is using now.

+ *  Mock ADTSECT for the CMS FS for Linux.
+ *    Based on: http://www.vm.ibm.com/pubs/cmsdacb/ADTSECT.HTML
+ *              noting offset 144 (0x90) for 80 bytes (0x50)
+ */
+typedef struct  CMSFSADT
+{
+       char    ADTIDENT[4] ;   /*  VOL START / LABEL IDENTIFIER  */
+       char    ADTID[6] ;      /*  VOL START / VOL IDENTIFIER  */
+       char    ADTVER[2] ;     /*  VERSION LEVEL  */
+       char    ADTDBSIZ[4] ;   /*  DISK BLOCK SIZE  */
+       char    ADTDOP[4] ;     /*  DISK ORIGIN POINTER  */
+       char    ADTCYL[4] ;     /*  NUM OF FORMATTED CYL ON DISK  */
+       char    ADTMCYL[4] ;    /*  MAX NUM FORMATTED CYL ON DISK  */
+       char    ADTNUM[4] ;     /*  Number of Blocks on disk  */
+       char    ADTUSED[4] ;    /*  Number of Blocks used  */
+       char    ADTFSTSZ[4] ;   /*  SIZE OF FST  */
+       char    ADTNFST[4] ;    /*  NUMBER OF FST'S PER BLOCK  */
+       char    ADTDCRED[6] ;   /*  DISK CREATION DATE (YYMMDDHHMMSS)  */
+       char    ADTFLGL[1] ;    /*  LABEL FLAG BYTE (ADTFLGL)  */
+#define         ADTCNTRY        0x01    /*  Century for disk creation
+                                        date (0=19, 1=20), corresponds to
+                                        ADTDCRED.  */
+       char    reserved[1] ;
+       char    ADTOFFST[4] ;   /*  DISK OFFSET WHEN RESERVED  */
+       char    ADTAMNB[4] ;    /*  ALLOC MAP BLOCK WITH NEXT HOLE  */
+       char    ADTAMND[4] ;    /*  DISP INTO HBLK DATA OF NEXT HOLE  */
+       char    ADTAMUP[4] ;    /*  DISP INTO USER PART OF ALLOC MAP  */
+       char    ADTOFCNT[4] ;   /*  Count of SFS open files for this ADT  */
+       char    ADTSFNAM[8] ;   /*  NAME OF SHARED SEGMENT  */
+} CMSFSADT ;
+ 
+#define         ADTLABSZ        0x00000050  /*  LENGTH OF THE LABEL PORTION  */
+ 
+/*
+     MAPPING OF VOLUME LABEL
+0090  144 Dbl-Word     8 * (0)
+0090  144 Character    4 ADTIDENT       VOL START / LABEL IDENTIFIER
+0094  148 Character    6 ADTID          VOL START / VOL IDENTIFIER
+009A  154 Character    2 ADTVER         VERSION LEVEL
+009C  156 Signed       4 ADTDBSIZ       DISK BLOCK SIZE
+00A0  160 Signed       4 ADTDOP         DISK ORIGIN POINTER
+00A4  164 Signed       4 ADTCYL         NUM OF FORMATTED CYL ON DISK
+00A8  168 Signed       4 ADTMCYL        MAX NUM FORMATTED CYL ON DISK
+00AC  172 Signed       4 ADTNUM         Number of Blocks assigned to the
+                                        minidisk or, in the case of an
+                                        SFS top directory, the number of
+                                        blocks assigned to the containing
+                                        filespace. This field is not set
+                                        for SFS subdirectories except as
+                                        a byproduct of the ADT Lookup
+                                        function, which queries the space
+                                        values for subdirs and also
+                                        leaves these values in the ADT
+                                        space fields.
+00B0  176 Signed       4 ADTUSED        Number of Blocks used in the
+                                        minidisk or, in the case of an
+                                        SFS top directory, the number of
+                                        blocks consumed in the containing
+                                        filespace. This field is not set
+                                        for SFS subdirectories except as
+                                        a byproduct of the ADT Lookup
+                                        function, which queries the space
+                                        values for subdirs and also
+                                        leaves these values in the ADT
+                                        space fields.
+00B4  180 Signed       4 ADTFSTSZ       SIZE OF FST
+00B8  184 Signed       4 ADTNFST        NUMBER OF FST'S PER BLOCK
+00BC  188 Character    6 ADTDCRED       DISK CREATION DATE (YYMMDDHHMMSS)
+00C2  194 Bitstring    1 ADTFLGL        LABEL FLAG BYTE (ADTFLGL)
+     EQUATES FOR ADT LABEL FLAG BYTE (ADTFLGL)
+          .... ...1      ADTCNTRY       X'01' Century for disk creation
+                                        date (0=19, 1=20), corresponds to
+                                        ADTDCRED.
+00C3  195 Character    1 *              RESERVED
+00C4  196 Signed       4 ADTOFFST       DISK OFFSET WHEN RESERVED
+00C8  200 Signed       4 ADTAMNB        ALLOC MAP BLOCK WITH NEXT HOLE
+00CC  204 Signed       4 ADTAMND        DISP INTO HBLK DATA OF NEXT HOLE
+00D0  208 Signed       4 ADTAMUP        DISP INTO USER PART OF ALLOC MAP
+00D4  212 Signed       4 ADTOFCNT       Count of SFS open files for this
+                                        ADT NOTE: ADTOFCNT IS NOT REALLY
+                                        PART OF THE VOLUME LABEL - IT IS
+                                        NOT USED FOR MINIDISKS.
+00D8  216 Character    8 ADTSFNAM       NAME OF SHARED SEGMENT
+          00000050       ADTLABSZ       *-ADTIDENT LENGTH OF THE LABEL
+                                        PORTION
+ 
+*     +---------------------------+---------------------------+
+*  90 |         ADTIDENT          |          ADTID-           |
+*     +-------------+-------------+---------------------------+
+*  98 |   -(094)    |   ADTVER    |         ADTDBSIZ          |
+*     +-------------+-------------+---------------------------+
+*  A0 |          ADTDOP           |          ADTCYL           |
+*     +---------------------------+---------------------------+
+*  A8 |         ADTMCYL           |          ADTNUM           |
+*     +---------------------------+---------------------------+
+*  B0 |         ADTUSED           |         ADTFSTSZ          |
+*     +---------------------------+---------------------------+
+*  B8 |         ADTNFST           |        ADTDCRED-          |
+*     +-------------+------+------+---------------------------+
+*  C0 |   -(0BC)    |:FLGL |//////|         ADTOFFST          |
+*     +-------------+------+------+---------------------------+
+*  C8 |         ADTAMNB           |         ADTAMND           |
+*     +---------------------------+---------------------------+
+*  D0 |         ADTAMUP           |         ADTOFCNT          |
+*     +---------------------------+---------------------------+
+*  D8 |                       ADTSFNAM                        |
+*     +-------------------------------------------------------+
+*  E0
+*
+ 
+This information is based on VM/ESA 2.4.0.
+Last updated on 12 Aug 1999 at 11:17:01 EDT.
+Copyright IBM Corporation, 1990, 1999
+ 


      



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to