Annotation of 43BSDReno/sys/hpdev/cdvar.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1988 University of Utah.
                      3:  * Copyright (c) 1990 The Regents of the University of California.
                      4:  * All rights reserved.
                      5:  *
                      6:  * This code is derived from software contributed to Berkeley by
                      7:  * the Systems Programming Group of the University of Utah Computer
                      8:  * Science Department.
                      9:  *
                     10:  * Redistribution is only permitted until one year after the first shipment
                     11:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
                     12:  * binary forms are permitted provided that: (1) source distributions retain
                     13:  * this entire copyright notice and comment, and (2) distributions including
                     14:  * binaries display the following acknowledgement:  This product includes
                     15:  * software developed by the University of California, Berkeley and its
                     16:  * contributors'' in the documentation or other materials provided with the
                     17:  * distribution and in all advertising materials mentioning features or use
                     18:  * of this software.  Neither the name of the University nor the names of
                     19:  * its contributors may be used to endorse or promote products derived from
                     20:  * this software without specific prior written permission.
                     21:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     22:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     23:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     24:  *
                     25:  * from: Utah $Hdr: cdvar.h 1.4 89/09/17$
                     26:  *
                     27:  *     @(#)cdvar.h     7.1 (Berkeley) 5/8/90
                     28:  */
                     29: 
                     30: #define        NCDISKS 8                       /* max # of component disks */
                     31: 
                     32: /*
                     33:  * A concatenated disk is described at config time by this structure.
                     34:  */
                     35: struct cddevice {
                     36:        int     cd_unit;                /* logical unit of this cd */
                     37:        int     cd_interleave;          /* interleave (DEV_BSIZE blocks) */
                     38:        int     cd_flags;               /* misc. information */
                     39:        int     cd_dk;                  /* disk number */
                     40:        dev_t   cd_dev[NCDISKS];        /* component devices */
                     41: };
                     42: 
                     43: /* cd_flags */
                     44: #define        CDF_SWAP        0x01    /* interleave should be dmmax */
                     45: #define CDF_UNIFORM    0x02    /* use LCD of sizes for uniform interleave */
                     46: 
                     47: /*
                     48:  * Component info table.
                     49:  * Describes a single component of a concatenated disk.
                     50:  */
                     51: struct cdcinfo {
                     52:        dev_t           ci_dev;  /* devno */
                     53:        size_t          ci_size; /* size */
                     54: };
                     55: 
                     56: /*
                     57:  * Interleave description table.
                     58:  * Computed at boot time to speed irregular-interleave lookups.
                     59:  * The idea is that we interleave in "groups".  First we interleave
                     60:  * evenly over all component disks up to the size of the smallest
                     61:  * component (the first group), then we interleave evenly over all
                     62:  * remaining disks up to the size of the next-smallest (second group),
                     63:  * and so on.
                     64:  *
                     65:  * Each table entry describes the interleave characteristics of one
                     66:  * of these groups.  For example if a concatenated disk consisted of
                     67:  * three components of 5, 3, and 7 DEV_BSIZE blocks interleaved at
                     68:  * DEV_BSIZE (1), the table would have three entries:
                     69:  *
                     70:  *     ndisk   startblk        startoff        dev
                     71:  *     3       0               0               0, 1, 2
                     72:  *     2       9               3               0, 2
                     73:  *     1       13              5               2
                     74:  *     0       -               -               -
                     75:  *
                     76:  * which says that the first nine blocks (0-8) are interleaved over
                     77:  * 3 disks (0, 1, 2) starting at block offset 0 on any component disk,
                     78:  * the next 4 blocks (9-12) are interleaved over 2 disks (0, 2) starting
                     79:  * at component block 3, and the remaining blocks (13-14) are on disk
                     80:  * 2 starting at offset 5.
                     81:  */
                     82: struct cdiinfo {
                     83:        int     ii_ndisk;       /* # of disks range is interleaved over */
                     84:        daddr_t ii_startblk;    /* starting scaled block # for range */
                     85:        daddr_t ii_startoff;    /* starting component offset (block #) */
                     86:        char    ii_index[NCDISKS];/* ordered list of components in range */
                     87: };
                     88: 
                     89: #ifdef KERNEL
                     90: extern struct cddevice cddevice[];
                     91: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.