fsync takes a waitfor flag; replace rdwri with vn_rdwr;
[unix-history] / usr / src / sys / ufs / ffs / ufs_inode.c
index b2aaa48..6410321 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.
  *
- *     @(#)ufs_inode.c 7.19 (Berkeley) %G%
+ *     @(#)ufs_inode.c 7.21 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -46,6 +46,8 @@ union ihead {
        struct inode *ih_chain[2];
 } ihead[INOHSZ];
 
        struct inode *ih_chain[2];
 } ihead[INOHSZ];
 
+int prtactive; /* 1 => print out reclaim of active vnodes */
+
 /*
  * Initialize hash links for inodes.
  */
 /*
  * Initialize hash links for inodes.
  */
@@ -229,7 +231,7 @@ ufs_inactive(vp)
        register struct inode *ip = VTOI(vp);
        int mode, error = 0;
 
        register struct inode *ip = VTOI(vp);
        int mode, error = 0;
 
-       if (vp->v_count != 0)
+       if (prtactive && vp->v_count != 0)
                printf("ufs_inactive: pushing active ino %d dev 0x%x\n",
                        ip->i_number, ip->i_dev);
        /*
                printf("ufs_inactive: pushing active ino %d dev 0x%x\n",
                        ip->i_number, ip->i_dev);
        /*
@@ -273,7 +275,7 @@ ufs_reclaim(vp)
 {
        register struct inode *ip = VTOI(vp);
 
 {
        register struct inode *ip = VTOI(vp);
 
-       if (vp->v_count != 0)
+       if (prtactive && vp->v_count != 0)
                printf("ufs_reclaim: pushing active ino %d dev 0x%x\n",
                        ip->i_number, ip->i_dev);
        /*
                printf("ufs_reclaim: pushing active ino %d dev 0x%x\n",
                        ip->i_number, ip->i_dev);
        /*
@@ -432,7 +434,7 @@ itrunc(oip, length)
        for (i = NDADDR - 1; i > lastblock; i--)
                oip->i_db[i] = 0;
        oip->i_flag |= ICHG|IUPD;
        for (i = NDADDR - 1; i > lastblock; i--)
                oip->i_db[i] = 0;
        oip->i_flag |= ICHG|IUPD;
-       allerror = syncip(oip);
+       allerror = syncip(oip, MNT_WAIT);
 
        /*
         * Indirect blocks first.
 
        /*
         * Indirect blocks first.