Article View: comp.bugs.4bsd
Article #1311Re: 4.3 Tahoe dump bug
From: Kent Hauser
Date: Mon, 19 Dec 1988 15:26
Date: Mon, 19 Dec 1988 15:26
55 lines
2298 bytes
2298 bytes
In article <23685@pprg.unm.edu>, cyrus@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@pprg.unm.edu
--
Kent Hauser UUCP: sun!sundc!tfd!kent
Twenty-First Designs INET: kent%tfd.uucp@sundc.sun.com
Technical Details
Message-ID:
<1135@tfd.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cucstud!tfd!kentReferences:
<23685@pprg.unm.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cucstud!tfd!kent From: kent@tfd.UUCP (Kent Hauser) Newsgroups: comp.bugs.4bsd Subject: Re: 4.3 Tahoe dump bug Summary: FIX: read a whole frag Keywords: dump bug Message-ID: <1135@tfd.UUCP> Date: 19 Dec 88 15:26:57 GMT References: <23685@pprg.unm.edu> Organization: Twenty-First Designs, Wash, DC Lines: 55