Subject: Re: Questions about 1.3
To: None <current-users@NetBSD.ORG>
From: Christoph Badura <>
List: current-users
Date: 10/05/1997 20:19:07
matthew green wrote:
> [Christoph Badura wrote:]
>    Shouldn't the kernel test that the dump partition is of type "swap"?
>    Is this actually documented somewhere?  Glancing over the obvious (to me)
>    man pages I couldn't find this mentioned.
>    Ideally, I guess, the kernel should configure the first partition of type
>    "swap" on the root device as dump device.

> you can set the dump device in your kernel configuration file
> (dumps on sd0b).

That's completely orthogonal to my suggestion, isn't it?

Anyway, we do no longer support linking of directories by the super
user, so why not check that the dump devices isn't a file system.
What else is the type field in the disk label for, anyway?

> also, if you enable swapping on a device,
> and no dumpdev has been specified, dumps will be abled on this
> device...

Huh?  Perhaps you meant, "and no dumpdev has been configured yet".
Because my kernels with "config netbsd root on ? type ?" configure
a dump device on the boot drive before starting init.  I don't think I
have specified a dump device.

Also, this "side effect" doesn't seem to be documented.  At least,
swapctl({2,8}) doesn't mention it.

> ideally, a dumpctl(2) call should be implemented and the setting
> of dump device moved entirely to userland.

A way to *change* the dump device from userland might be nice.  As I
see it, you can't have complete dumps if the dump device that the
kernel autoconfigures isn't big enough to hold a full dump.  That would
be nice to have on machines with multiple disks where you want to
spread the swap over several disks for performance reasons.  Being able
to specify how many blocks of a swap partition are available for
swapping would help in this case too.

Of course, you can always hard-wire the dump device in the kernel
confguration file.  This, however, might become a PITA when NetBSD
supports hot swapping of disks (and other hardware).

Why we would need a new syscall for this is beyond me, thought.  It
seems to me that changing the dump device with sysctl(2) would be the
right way to go for now.

> jason, what are you thoughts on this matter?  should we do it
> for 1.3 ?

The kernel checking that the autoconfigured dump device is a partition
of type "swap"?  That would be nice.

Christoph Badura

Now available in print: Lion's Commentary on UNIX 6th Edition, with Source Code