ifdef for dev_bsize
authorMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 3 Apr 1987 06:17:35 +0000 (22:17 -0800)
committerMike Karels <karels@ucbvax.Berkeley.EDU>
Fri, 3 Apr 1987 06:17:35 +0000 (22:17 -0800)
SCCS-vsn: sys/sys/buf.h 7.3.1.1
SCCS-vsn: sys/sys/conf.h 7.1.1.1
SCCS-vsn: sys/ufs/ffs/fs.h 7.2.1.1

usr/src/sys/sys/buf.h
usr/src/sys/sys/conf.h
usr/src/sys/ufs/ffs/fs.h

index 9635493..21f9886 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)buf.h       7.3 (Berkeley) %G%
+ *     @(#)buf.h       7.3.1.1 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -59,6 +59,9 @@ struct buf
            daddr_t *b_daddr;           /* indirect block */
        } b_un;
        daddr_t b_blkno;                /* block # on device */
            daddr_t *b_daddr;           /* indirect block */
        } b_un;
        daddr_t b_blkno;                /* block # on device */
+#ifdef SECSIZE
+       long    b_blksize;              /* size of device blocks */
+#endif SECSIZE
        long    b_resid;                /* words not transferred after error */
 #define        b_errcnt b_resid                /* while i/o in progress: # retries */
        struct  proc *b_proc;           /* proc doing physical or swap I/O */
        long    b_resid;                /* words not transferred after error */
 #define        b_errcnt b_resid                /* while i/o in progress: # retries */
        struct  proc *b_proc;           /* proc doing physical or swap I/O */
@@ -74,8 +77,14 @@ struct buf
 #define        BQ_EMPTY        3               /* buffer headers with no memory */
 
 #ifdef KERNEL
 #define        BQ_EMPTY        3               /* buffer headers with no memory */
 
 #ifdef KERNEL
+#ifdef SECSIZE
+#define        BUFHSZ          512
+#define        MINSECSIZE      512
+#define RND    (MAXBSIZE/MINSECSIZE)
+#else SECSIZE
 #define        BUFHSZ  512
 #define RND    (MAXBSIZE/DEV_BSIZE)
 #define        BUFHSZ  512
 #define RND    (MAXBSIZE/DEV_BSIZE)
+#endif SECSIZE
 #if    ((BUFHSZ&(BUFHSZ-1)) == 0)
 #define        BUFHASH(dev, dblkno)    \
        ((struct buf *)&bufhash[((int)(dev)+(((int)(dblkno))/RND))&(BUFHSZ-1)])
 #if    ((BUFHSZ&(BUFHSZ-1)) == 0)
 #define        BUFHASH(dev, dblkno)    \
        ((struct buf *)&bufhash[((int)(dev)+(((int)(dblkno))/RND))&(BUFHSZ-1)])
index fbcd9cc..661ae81 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)conf.h      7.1 (Berkeley) %G%
+ *     @(#)conf.h      7.1.1.1 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -20,6 +20,7 @@ struct bdevsw
        int     (*d_open)();
        int     (*d_close)();
        int     (*d_strategy)();
        int     (*d_open)();
        int     (*d_close)();
        int     (*d_strategy)();
+       int     (*d_ioctl)();
        int     (*d_dump)();
        int     (*d_psize)();
        int     d_flags;
        int     (*d_dump)();
        int     (*d_psize)();
        int     d_flags;
@@ -76,6 +77,10 @@ struct swdevt
        dev_t   sw_dev;
        int     sw_freed;
        int     sw_nblks;
        dev_t   sw_dev;
        int     sw_freed;
        int     sw_nblks;
+#ifdef SECSIZE
+       int     sw_blksize;
+       int     sw_bshift;
+#endif SECSIZE
 };
 #ifdef KERNEL
 struct swdevt swdevt[];
 };
 #ifdef KERNEL
 struct swdevt swdevt[];
index 5476ec3..f4a1324 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)fs.h        7.2 (Berkeley) %G%
+ *     @(#)fs.h        7.2.1.1 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
  * the ``cgbase(fs, cg)'' macro.
  *
  * The first boot and super blocks are given in absolute disk addresses.
  * the ``cgbase(fs, cg)'' macro.
  *
  * The first boot and super blocks are given in absolute disk addresses.
+ * The byte-offset forms are preferred, as they don't imply a sector size.
  */
 #define BBSIZE         8192
 #define SBSIZE         8192
  */
 #define BBSIZE         8192
 #define SBSIZE         8192
+#define        BBOFF           ((off_t)(0))
+#define        SBOFF           ((off_t)(BBOFF + BBSIZE))
+#ifndef SECSIZE
 #define        BBLOCK          ((daddr_t)(0))
 #define        SBLOCK          ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
 #define        BBLOCK          ((daddr_t)(0))
 #define        SBLOCK          ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
+#endif SECSIZE
 
 /*
  * Addresses stored in inodes are capable of addressing fragments
 
 /*
  * Addresses stored in inodes are capable of addressing fragments
@@ -198,7 +203,8 @@ struct      fs
        char    fs_ronly;               /* mounted read-only flag */
        char    fs_flags;               /* currently unused flag */
        char    fs_fsmnt[MAXMNTLEN];    /* name mounted on */
        char    fs_ronly;               /* mounted read-only flag */
        char    fs_flags;               /* currently unused flag */
        char    fs_fsmnt[MAXMNTLEN];    /* name mounted on */
-       long    fs_sparecon[32];        /* reserved for future constants */
+       long    fs_dbsize;              /* hardware sector size */
+       long    fs_sparecon[31];        /* reserved for future constants */
 /* these fields retain the current block allocation info */
        long    fs_cgrotor;             /* last cg searched */
        struct  csum *fs_csp[MAXCSBUFS];/* list of fs_cs info buffers */
 /* these fields retain the current block allocation info */
        long    fs_cgrotor;             /* last cg searched */
        struct  csum *fs_csp[MAXCSBUFS];/* list of fs_cs info buffers */