Subject: Re: swap_page errors
To: None <>
From: Brett Lymn <>
List: tech-kern
Date: 01/07/1994 18:51:28
I am not sure whether I should be breaking out the sackcloth shirt,
ashes and birch sticks (for self-flagellation) or not.

Earlier I complained about these errors:

Jan  7 16:31:13 siren /netbsd:  error 22 blkno 65976 sz 4096
Jan  7 16:31:13 siren /netbsd: sd0: illegal request

I have made the problem go away by not using the last cylinder of my
harddisk, the disklabel looks like this:

# /dev/rsd0a:
type: SCSI
bytes/sector: 512
sectors/track: 71
tracks/cylinder: 15
sectors/cylinder: 1065
cylinders: 1931
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

3 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:  1990485        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 1868)
  b:    64965  1990485    unused        0     0         # (Cyl. 1869 - 1929)
  c:  2056515        0    unused        0     0         # (Cyl.    0 - 1930)

Previously partition b was Cyl. 1869 - 1930 but I found by adding a
printf to sd.c, using ddb and a calculator that the swap code was
attempting to write to blocks outside the cylinder range given.  I
suspect that if this was really the case then this bug would have been
picked up ages ago.  I think I have an explanation as to what is going
wrong in my case...

The only odd this about this disklabel is that when I reboot my
machine the attach message comes up with:

Jan  7 16:07:13 siren /netbsd: sd0 at aha0 targ 0 lun 0: 990MB 1931 cyl, 15 head, 70 sec, 512 byte/sec

Note the "70 sec" which I take to mean that there are 70 sectors/track.

The label for my scsi disk was generated by the "happy install"
program of 0.1 days, it has been working for at least 9 months or so
under 0.1 386BSD.

If I take the "70 sec" as being kosher and work out the number of
cylinders occupied by the current b partition it comes out to just
under 32 cylinders (70 sec/trk = 1050 sec/cyl).

This all leaves me very confused (and embarassed), 386BSD worked fine
with the old partitioning or, more likely, did not complain.
Prior to me setting up a secondary swap partition on my scsi disk (my
primary boot disk is an ESDI drive) I used to have the entire disk for
a file system again this was under 386BSD.

I am going to go away quietly and beat myself sensless...

Brett Lymn, Computer Systems Administrator, AWA Defence Industries
"Where a calculator on the ENIAC is equipped with 18,000 vaccuum tubes
and weighs 30 tons, computers in the future may have only 1,000 vaccuum
tubes and perhaps weigh 1 1/2 tons."
                -- Popular Mechanics, March 1949