home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / bugs / 4bsd / ucbfixe / 6 next >
Encoding:
Text File  |  1993-01-25  |  2.2 KB  |  87 lines

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!VANGOGH.CS.BERKELEY.EDU!bostic
  2. From: bostic@VANGOGH.CS.BERKELEY.EDU (Keith Bostic)
  3. Newsgroups: comp.bugs.4bsd.ucb-fixes
  4. Subject: V1.100 (Bug in NET2 dump and newly released dump)
  5. Message-ID: <199301260206.AA13088@vangogh.CS.Berkeley.EDU>
  6. Date: 26 Jan 93 02:06:25 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: University of California at Berkeley
  10. Lines: 74
  11. Approved: ucb-fixes@okeeffe.berkeley.edu
  12.  
  13. Subject: Bug in NET2 dump and newly released dump.
  14. Index: sbin/{dump,restore} 4.4BSD-alpha
  15.  
  16. Description:
  17.  
  18.     dumptraverse.c:mapfiles() contains a loop that begins with:
  19.  
  20.         for (ino = 0; ino < maxino; ino++) {
  21.             dp = getino(ino);
  22.  
  23.     This contrasts with the loop in main() containing:
  24.  
  25.         for (map = dumpdirmap, ino = 0; ino < maxino; ) {
  26.             dirty = GETDIRTY(ino)    /* Shortened for brevity. */
  27.             ino++;
  28.             if ((dirty & 1) == 0)
  29.                 continue;
  30.             dp = getino(ino);    /* Work with dp. */        
  31.         }
  32.  
  33.     and the subsequent loop using dumpinomap.
  34.  
  35.     While the loops in main() appear to be correct, the loop in
  36.     mapfiles() can never invoke:
  37.  
  38.         SETINO(maxino, usedinomap)
  39.     or 
  40.         SETINO(maxino, dumpinomap);
  41.  
  42.     Changing the < to <= in mapfiles() (BUT NOT IN MAIN!!) fixes it.
  43.  
  44. Fix:
  45.     Copies of the new dump/restore package are available by anonymous
  46.     ftp from ftp.cs.berkeley.edu:ucb/4bsd/dump.restore.tar.Z.
  47.  
  48.     The following patch also fixes the problem.
  49.  
  50. *** traverse.c.old    Mon Jan 25 12:50:10 1993
  51. --- traverse.c.new    Mon Jan 25 12:49:52 1993
  52. ***************
  53. *** 32,38 ****
  54.    */
  55.   
  56.   #ifndef lint
  57. ! static char sccsid[] = "@(#)traverse.c    5.21 (Berkeley) 7/19/92";
  58.   #endif /* not lint */
  59.   
  60.   #ifdef sunos
  61. --- 32,38 ----
  62.    */
  63.   
  64.   #ifndef lint
  65. ! static char sccsid[] = "@(#)traverse.c    5.22 (Berkeley) 1/25/93";
  66.   #endif /* not lint */
  67.   
  68.   #ifdef sunos
  69. ***************
  70. *** 115,121 ****
  71.       register struct dinode *dp;
  72.       int anydirskipped = 0;
  73.   
  74. !     for (ino = 0; ino < maxino; ino++) {
  75.           dp = getino(ino);
  76.           if ((mode = (dp->di_mode & IFMT)) == 0)
  77.               continue;
  78. --- 115,121 ----
  79.       register struct dinode *dp;
  80.       int anydirskipped = 0;
  81.   
  82. !     for (ino = 0; ino <= maxino; ino++) {
  83.           dp = getino(ino);
  84.           if ((mode = (dp->di_mode & IFMT)) == 0)
  85.               continue;
  86.  
  87.