Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!mwm%ucbopal@ucbvax.berkeley.edu From: mwm%ucbopal@ucbvax.berkeley.edu Newsgroups: net.unix-wizards Subject: Re: VAX 750/4.2 BSD disk trashing Message-ID: <1765@brl-tgr.ARPA> Date: Mon, 20-Jan-86 04:51:34 EST Article-I.D.: brl-tgr.1765 Posted: Mon Jan 20 04:51:34 1986 Date-Received: Thu, 23-Jan-86 21:43:32 EST Sender: news@brl-tgr.ARPA Lines: 47 You've just tripped over a known bug in 4.2 BSD. It's a symptom of a more general problem: the mount system call is *stupid*. This has been fixed in 4.3. I found the solution to your specific problem a while back, and mailed it to the 4bsd-bugs list. You need to move a couple of lines about 1/2 dozen lines in the mount call. The diffs follow. m_bufp = tp; /* just to reserve this slot */ mp->m_dev = NODEV; fs = tp->b_un.b_fs; bp = geteblk((int)fs->fs_sbsize); mp->m_bufp = bp; bcopy((caddr_t)tp->b_un.b_addr, (caddr_t)bp->b_un.b_addr, --- 87,94 ----- mp->m_bufp = tp; /* just to reserve this slot */ mp->m_dev = NODEV; fs = tp->b_un.b_fs; + if (fs->fs_magic != FS_MAGIC || fs->fs_bsize > MAXBSIZE) + goto out; bp = geteblk((int)fs->fs_sbsize); mp->m_bufp = bp; bcopy((caddr_t)tp->b_un.b_addr, (caddr_t)bp->b_un.b_addr, *************** *** 94,101 brelse(tp); tp = 0; fs = bp->b_un.b_fs; - if (fs->fs_magic != FS_MAGIC || fs->fs_bsize > MAXBSIZE) - goto out; fs->fs_ronly = (ronly != 0); if (ronly == 0) fs->fs_fmod = 1; --- 96,101 ----- brelse(tp); tp = 0; fs = bp->b_un.b_fs; fs->fs_ronly = (ronly != 0); if (ronly == 0) fs->fs_fmod = 1;