4.3 Tahoe dump bug
Kent Hauser
kent at tfd.UUCP
Tue Dec 20 01:26:57 AEST 1988
In article <23685 at pprg.unm.edu>, cyrus at pprg.unm.edu (Tait Cyrus) writes:
>
> In the process of trying to get the 4.3 Tahoe dump running on a Sun 3
> running SunOS 3.X, I, along with others, have run into the following
> bug (feature) (shown below).
>
> >Writing dump file 0 (/research)
> > DUMP: Date of this level 1 dump: Sat Dec 17 12:59:10 1988
> > DUMP: Date of last level 0 dump: Wed Dec 14 19:08:42 1988
> > DUMP: Dumping /dev/rxy1g (/research) to /dev/rmt1h on host houdini
> > DUMP: mapping (Pass I) [regular files]
> > DUMP: mapping (Pass II) [directories]
> > DUMP: (This should not happen)bread from /dev/rxy1g [block 58766]: count=24, got=512
> > DUMP: (This should not happen)bread from /dev/rxy1g [block 60802]: count=536, got=1024
> > .
> > .
> > .
> ---
The problem is that some raw device drivers can not read a partial block.
See for instance the SunOS sd(4) man page. I suspect that this problem
is inherent with SCSI devices.
The 'fix' is to make dump always read the complete frag when
reading the directories. Attached is my fix:
*** dumptraverse.c~ Fri Nov 18 12:22:18 1988
--- dumptraverse.c Sat Dec 10 12:21:49 1988
***************
*** 265,271 ****
return;
if (filesize > size)
filesize = size;
! bread(fsbtodb(sblock, d), dblk, filesize);
for (loc = 0; loc < filesize; ) {
dp = (struct direct *)(dblk + loc);
if (dp->d_reclen == 0) {
--- 265,272 ----
return;
if (filesize > size)
filesize = size;
! /* change the third bread arg from filesize to size to read whole frag */
! bread(fsbtodb(sblock, d), dblk, size);
for (loc = 0; loc < filesize; ) {
dp = (struct direct *)(dblk + loc);
if (dp->d_reclen == 0) {
==============================
> W. Tait Cyrus (505) 277-0806 e-mail: cyrus at pprg.unm.edu
--
Kent Hauser UUCP: sun!sundc!tfd!kent
Twenty-First Designs INET: kent%tfd.uucp at sundc.sun.com
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list