Subject: Re: Swap beginning with cylinder 0
To: None <tech-kern@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: tech-kern
Date: 05/23/1996 06:12:41
>> [...] this can of worms about reserving part of a swap area to avoid
>> swapping over disk labels and the like, the alternative that seems
>> best to me is to define a new ioctl for disk drivers.  If we call
>> this ioctl, for the sake of argument, DIOCSWAPSKIP, then the idea is
>> that the swap code does a DIOCSWAPSKIP on the swap device to find
>> out how much it should skip.

> What SunOS does is when it is told to start swapping on a partition,
> it checks out what the absolute "entire disk" starting block is for
> the slice, and if it is zero or less than the space occupied by a
> disklabel etc. then it adjusts the base block to the "safe" starting
> block.

Well, SunOS has it easier in a couple of respects.

- It can have the offset hardwired to 8K everywhere.  We can't do this
   because we've got lots of different ports, and their requirements in
   this respect differ.

- Every partition _has_ an absolute starting block number, an
   assumption which breaks in the presence of vnds and ccds.

Actually, what does it do for the absolute starting block number for
NFS swap?  In whatever scheme we use, we'll have to address NFS swap.

					der Mouse