minor bug in dump, can cause system to hang.

Chris Torek chris at umcp-cs.UUCP
Tue Oct 8 18:41:25 AEST 1985


In article <2856 at sun.uucp> shannon at sun.uucp (Bill Shannon) writes:
>> In article <1763 at brl-tgr.ARPA> davet at RAND-UNIX.ARPA (Dave Truesdell) writes:
>>
>> But why fix dump when the problem is almost certainly in the disk driver?
>
> Because: [... the manuals] strongly suggest that you do reads in multiples
> of 512 (== DEV_BSIZE) when reading the raw device [; and]  Not all disk
> controllers on all machines are capable of reading partial sectors.

This is, I must admit, a good point.  However. . . .

> The bug is in dump, and should be fixed there.

Actually, the bug is once again in the kernel.  Dump should perhaps
be more careful in its assumption that directory sizes are always
correct; but directories are always supposed to be an exact multiple
of DEV_BSIZE.  The 4.2BSD mkdir system call wrote out `dirtemplate'
without first padding it out, giving 24 byte directories, which on
occasion would remain 24+k*512 bytes (usually the 24+ disappears
after the first file creation).

The 4.3BSD kernel has this fixed (and the 4.3 `fsck' adjusts
directory sizes upward as necessary to fix the 24+ problem).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.unix.wizards mailing list