+ short fs_cpc; /* cyl per cycle in postbl */
+ short fs_postbl[MAXCPG][NRPOS];/* head of blocks for each rotation */
+ u_char fs_rotbl[1]; /* list of blocks for each rotation */
+/* actually longer */
+};
+
+/*
+ * convert cylinder group to base address of its global summary info.
+ *
+ * N.B. This macro assumes that sizeof(struct csum) is a power of two.
+ */
+#define fs_cs(fs, indx) \
+ fs_csp[(indx) / ((fs)->fs_bsize / sizeof(struct csum))] \
+ [(indx) % ((fs)->fs_bsize / sizeof(struct csum))]
+
+/*
+ * MAXBPC bounds the size of the rotational layout tables and
+ * is limited by the fact that the super block is of size SBSIZE.
+ * The size of these tables is INVERSELY proportional to the block
+ * size of the file system. It is aggravated by sector sizes that
+ * are not powers of two, as this increases the number of cylinders
+ * included before the rotational pattern repeats (fs_cpc).
+ * Its size is derived from the number of bytes remaining in (struct fs)
+ */
+#define MAXBPC (SBSIZE - sizeof (struct fs))
+
+/*
+ * Cylinder group block for a file system.
+ */
+#define CG_MAGIC 0x092752
+struct cg {
+ long cg_magic; /* magic number */
+ time_t cg_time; /* time last written */
+ long cg_cgx; /* we are the cgx'th cylinder group */
+ short cg_ncyl; /* number of cyl's this cg */
+ short cg_niblk; /* number of inode blocks this cg */
+ long cg_ndblk; /* number of data blocks this cg */
+ struct csum cg_cs; /* cylinder summary information */
+ long cg_rotor; /* position of last used block */
+ long cg_frotor; /* position of last used frag */
+ long cg_irotor; /* position of last used inode */
+ long cg_frsum[MAXFRAG]; /* counts of available frags */
+ short cg_b[MAXCPG][NRPOS]; /* positions of free blocks */
+ char cg_iused[MAXIPG/NBBY]; /* used inode map */
+ char cg_free[1]; /* free block map */