merge in vnodes
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 May 1989 11:53:08 +0000 (03:53 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 10 May 1989 11:53:08 +0000 (03:53 -0800)
SCCS-vsn: sys/tahoe/tahoe/conf.c 7.5
SCCS-vsn: sys/tahoe/tahoe/machdep.c 7.2
SCCS-vsn: sys/tahoe/tahoe/mem.c 7.3

usr/src/sys/tahoe/tahoe/conf.c
usr/src/sys/tahoe/tahoe/machdep.c
usr/src/sys/tahoe/tahoe/mem.c

index a9f1759..f55c738 100644 (file)
@@ -14,7 +14,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)conf.c      7.4 (Berkeley) %G%
+ *     @(#)conf.c      7.5 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -100,7 +100,7 @@ struct      tty vx_tty[];
 
 int    syopen(),syread(),sywrite(),syioctl(),syselect();
 
 
 int    syopen(),syread(),sywrite(),syioctl(),syselect();
 
-int    mmread(),mmwrite();
+int    mmrw();
 #define        mmselect        seltrue
 
 #include "pty.h"
 #define        mmselect        seltrue
 
 #include "pty.h"
@@ -202,7 +202,7 @@ struct cdevsw       cdevsw[] =
        syopen,         nulldev,        syread,         sywrite,        /*2*/
        syioctl,        nulldev,        nulldev,        NULL,
        syselect,       nodev,          NULL,
        syopen,         nulldev,        syread,         sywrite,        /*2*/
        syioctl,        nulldev,        nulldev,        NULL,
        syselect,       nodev,          NULL,
-       nulldev,        nulldev,        mmread,         mmwrite,        /*3*/
+       nulldev,        nulldev,        mmrw,           mmrw,           /*3*/
        nodev,          nulldev,        nulldev,        NULL,
        mmselect,       nodev,          NULL,
        nodev,          nulldev,        nodev,          nodev,          /*4*/
        nodev,          nulldev,        nulldev,        NULL,
        mmselect,       nodev,          NULL,
        nodev,          nulldev,        nodev,          nodev,          /*4*/
index 2e984fa..6036b07 100644 (file)
@@ -3,12 +3,11 @@
  * 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.
  *
- *     @(#)machdep.c   7.1 (Berkeley) %G%
+ *     @(#)machdep.c   7.2 (Berkeley) %G%
  */
 
 #include "param.h"
 #include "systm.h"
  */
 
 #include "param.h"
 #include "systm.h"
-#include "dir.h"
 #include "user.h"
 #include "kernel.h"
 #include "map.h"
 #include "user.h"
 #include "kernel.h"
 #include "map.h"
@@ -17,7 +16,8 @@
 #include "buf.h"
 #include "reboot.h"
 #include "conf.h"
 #include "buf.h"
 #include "reboot.h"
 #include "conf.h"
-#include "inode.h"
+#include "vnode.h"
+#include "../ufs/inode.h"
 #include "file.h"
 #include "text.h"
 #include "clist.h"
 #include "file.h"
 #include "text.h"
 #include "clist.h"
@@ -26,7 +26,7 @@
 #include "malloc.h"
 #include "mbuf.h"
 #include "msgbuf.h"
 #include "malloc.h"
 #include "mbuf.h"
 #include "msgbuf.h"
-#include "quota.h"
+#include "../ufs/quota.h"
 
 #include "cpu.h"
 #include "reg.h"
 
 #include "cpu.h"
 #include "reg.h"
@@ -451,8 +451,8 @@ boot(arghowto)
                 * Release inodes held by texts before update.
                 */
                if (panicstr == 0)
                 * Release inodes held by texts before update.
                 */
                if (panicstr == 0)
-                       xumount(NODEV);
-               update();
+                       xumount(NULL);
+               sync();
 
                for (iter = 0; iter < 20; iter++) {
                        nbusy = 0;
 
                for (iter = 0; iter < 20; iter++) {
                        nbusy = 0;
index c221fab..261f92b 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.
  *
- *     @(#)mem.c       7.2 (Berkeley) %G%
+ *     @(#)mem.c       7.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -11,7 +11,6 @@
  */
 
 #include "param.h"
  */
 
 #include "param.h"
-#include "dir.h"
 #include "user.h"
 #include "conf.h"
 #include "buf.h"
 #include "user.h"
 #include "conf.h"
 #include "buf.h"
 #include "pte.h"
 #include "mtpr.h"
 
 #include "pte.h"
 #include "mtpr.h"
 
-mmread(dev, uio, flag)
+/* ARGSUSED */
+mmrw(dev, uio, flag)
        dev_t dev;
        struct uio *uio;
        dev_t dev;
        struct uio *uio;
-{
-
-       return (mmrw(dev, uio, UIO_READ));
-}
-
-mmwrite(dev, uio, flag)
-       dev_t dev;
-       struct uio *uio;
-{
-
-       return (mmrw(dev, uio, UIO_WRITE));
-}
-
-mmrw(dev, uio, rw)
-       dev_t dev;
-       struct uio *uio;
-       enum uio_rw rw;
+       int flag;
 {
        register int o;
        register u_int c, v;
 {
        register int o;
        register u_int c, v;
@@ -68,13 +52,13 @@ mmrw(dev, uio, rw)
                        if (v >= physmem)
                                goto fault;
                        *(int *)mmap = v | PG_V |
                        if (v >= physmem)
                                goto fault;
                        *(int *)mmap = v | PG_V |
-                               (rw == UIO_READ ? PG_KR : PG_KW);
+                               (uio->uio_rw == UIO_READ ? PG_KR : PG_KW);
                        mtpr(TBIS, vmmap);
                        o = (int)uio->uio_offset & PGOFSET;
                        c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
                        c = MIN(c, (u_int)(NBPG - o));
                        c = MIN(c, (u_int)iov->iov_len);
                        mtpr(TBIS, vmmap);
                        o = (int)uio->uio_offset & PGOFSET;
                        c = (u_int)(NBPG - ((int)iov->iov_base & PGOFSET));
                        c = MIN(c, (u_int)(NBPG - o));
                        c = MIN(c, (u_int)iov->iov_len);
-                       error = uiomove((caddr_t)&vmmap[o], (int)c, rw, uio);
+                       error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
                        continue;
 
 /* minor device 1 is kernel memory */
                        continue;
 
 /* minor device 1 is kernel memory */
@@ -86,14 +70,15 @@ mmrw(dev, uio, rw)
                            (caddr_t)uio->uio_offset < (caddr_t)&vmemend)
                                goto fault;
                        c = iov->iov_len;
                            (caddr_t)uio->uio_offset < (caddr_t)&vmemend)
                                goto fault;
                        c = iov->iov_len;
-                       if (!kernacc((caddr_t)uio->uio_offset, c, rw == UIO_READ ? B_READ : B_WRITE))
+                       if (!kernacc((caddr_t)uio->uio_offset, c,
+                           uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
                                goto fault;
                                goto fault;
-                       error = uiomove((caddr_t)uio->uio_offset, (int)c, rw, uio);
+                       error = uiomove((caddr_t)uio->uio_offset, (int)c, uio);
                        continue;
 
 /* minor device 2 is EOF/RATHOLE */
                case 2:
                        continue;
 
 /* minor device 2 is EOF/RATHOLE */
                case 2:
-                       if (rw == UIO_READ)
+                       if (uio->uio_rw == UIO_READ)
                                return (0);
                        c = iov->iov_len;
                        break;
                                return (0);
                        c = iov->iov_len;
                        break;
@@ -101,12 +86,14 @@ mmrw(dev, uio, rw)
 /* minor device 3 is versabus memory (addressed by shorts) */
                case 3:
                        c = iov->iov_len;
 /* minor device 3 is versabus memory (addressed by shorts) */
                case 3:
                        c = iov->iov_len;
-                       if (!kernacc((caddr_t)uio->uio_offset, c, rw == UIO_READ ? B_READ : B_WRITE))
+                       if (!kernacc((caddr_t)uio->uio_offset, c,
+                           uio->uio_rw == UIO_READ ? B_READ : B_WRITE))
                                goto fault;
                                goto fault;
-                       if (!useracc(iov->iov_base, c, rw == UIO_READ ? B_WRITE : B_READ))
+                       if (!useracc(iov->iov_base, c,
+                           uio->uio_rw == UIO_READ ? B_WRITE : B_READ))
                                goto fault;
                        error = VERSAcpy((caddr_t)uio->uio_offset, iov->iov_base,
                                goto fault;
                        error = VERSAcpy((caddr_t)uio->uio_offset, iov->iov_base,
-                           (int)c, rw);
+                           (int)c, uio->uio_rw);
                        break;
                }
                if (error)
                        break;
                }
                if (error)