Sys V r2 version 2 swap bug

Phil Chadwick phil at qfdts.oz
Tue Jul 16 14:38:00 AEST 1985


Bill Stewart (ho95c!wcs AT&T Bell Labs, Holmdel NJ) writes that
in System V r2.0 version 2:

    >[... Has anyone been able to change swap areas?...]
    >Yes, I do it all the time.  My system boots up with swap on the
    >root drive, which is boring; in the /etc/rc I do the following:
    >
    >	swap -a /dev/dsk/1s1 0 70000	# Add 70Kblocks swap on 1s1
    >	swap -d /dev/dsk/0s0 14320	# Remove 0s0 swap.
    >	swap -l				# List what's left

I appreciate the advice since it made me think the problem
through a little further.

I should have said that the problem was on a VAX, although I
don't know if it is specific to the VAX.  To recap, our VAX
panics (as soon as it has to swap) after extra swap space
(on a drive type which differs from the initially configured
swap device) is added to the system with a swap(1m) command.

It does not surprise me that the above swap commands worked
because on a VAX at least, /dev/dsk/1s1 and /dev/dsk/0s0 are
massbus disks and will both have the same major device code
(reflecting either the rm05 or gd driver).  Hence using
"bmajor(swapdev)" will select the correct driver for both
swap areas.

I still think that the "swapdev" in line 72 of physio.c is wrong
(because it reflects the initially configured swap device, not
necessarily the one that should be used):

	(*bdevsw[bmajor(swapdev)].d_strategy)(bp)

I think that "swapdev" should be changed to "dev".  But is this
all that is required?

----
Phil Chadwick		  Australia: (07) 2296500
Department of Forestry	  International: +61 7 2296500
PO Box 5		  ACSnet: phil at qfdts.oz
Brisbane, Roma Street	  ARPA: decvax!mulga!qfdts.oz!phil at UCB-VAX.ARPA
AUSTRALIA	4001	  UUCP: {decvax,vax135,eagle,pesnta}!mulga!qfdts.oz!phil



More information about the Net.bugs.usg mailing list