From wjw@files.digiware.nl  Mon Dec 30 06:59:17 2002
Return-Path: <wjw@files.digiware.nl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C739537B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Dec 2002 06:59:17 -0800 (PST)
Received: from files.digiware.nl (d9218.upc-d.chello.nl [213.46.9.218])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DFB2543ED1
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Dec 2002 06:59:15 -0800 (PST)
	(envelope-from wjw@files.digiware.nl)
Received: from files.digiware.nl (localhost.digiware.nl [127.0.0.1])
	by files.digiware.nl (8.12.6/8.12.6) with ESMTP id gBUEwsHq078002
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 30 Dec 2002 15:59:11 +0100 (CET)
	(envelope-from wjw@files.digiware.nl)
Received: (from root@localhost)
	by files.digiware.nl (8.12.6/8.12.6/Submit) id gBUEwEmb078001;
	Mon, 30 Dec 2002 15:58:15 +0100 (CET)
Message-Id: <200212301458.gBUEwEmb078001@files.digiware.nl>
Date: Mon, 30 Dec 2002 15:58:15 +0100 (CET)
From: Willem Jan Withagen <wjw@files.digiware.nl>
Reply-To: Willem Jan Withagen <wjw@files.digiware.nl>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Flase error report in swapon when adding too many disks
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46633
>Category:       bin
>Synopsis:       Flase error report in swapon when adding too many disks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 07:00:11 PST 2002
>Closed-Date:    Mon Feb 24 00:55:28 PST 2003
>Last-Modified:  Mon Feb 24 00:55:28 PST 2003
>Originator:     Willem Jan Withagen
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Private
>Environment:
System: FreeBSD files.digiware.nl 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Sat Dec 28 19:38:16 CET 2002 root@files.digiware.nl:/mnt2/obj/usr/src5/sys/GENERIC i386


When adding too many disk for swapping the error reported is a 'strange one'
Nicer would be to respond something like:
	All swapdisk slots are occupied.

--WjW

# swapon /dev/ad6s1b /dev/ad7s1b
swapon: /dev/ad7s1b: Invalid argument
files# swapinfo
Device          1K-blocks     Used    Avail Capacity  Type
/dev/ad0s1b        111148     9936   101212     9%    Interleaved
/dev/ad4s1b        512000        0   512000     0%    Interleaved
/dev/ad5s1b        512000        0   512000     0%    Interleaved
/dev/ad6s1b        512000        0   512000     0%    Interleaved
Total             1647148     9936  1637212     1%
files# swapon /dev/ad7s1b
swapon: /dev/ad7s1b: Invalid argument
files# sysctl -a | grep swapdev
vm.nswapdev: 4

>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: David Schultz <dschultz@uclink.Berkeley.EDU>
To: Willem Jan Withagen <wjw@files.digiware.nl>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/46633: Flase error report in swapon when adding too many disks
Date: Mon, 30 Dec 2002 16:33:10 -0800

 Thus spake Willem Jan Withagen <wjw@files.digiware.nl>:
 > When adding too many disk for swapping the error reported is a 'strange one'
 > Nicer would be to respond something like:
 > 	All swapdisk slots are occupied.
 
 If swapon(2) returned EBUSY in this case, you'd get the message
 'Device busy' without having to make a special case out of it.
 Does that sound better?
 
 > # swapon /dev/ad6s1b /dev/ad7s1b
 > swapon: /dev/ad7s1b: Invalid argument
 > files# swapinfo
 > Device          1K-blocks     Used    Avail Capacity  Type
 > /dev/ad0s1b        111148     9936   101212     9%    Interleaved
 > /dev/ad4s1b        512000        0   512000     0%    Interleaved
 > /dev/ad5s1b        512000        0   512000     0%    Interleaved
 > /dev/ad6s1b        512000        0   512000     0%    Interleaved
 > Total             1647148     9936  1637212     1%
 > files# swapon /dev/ad7s1b
 > swapon: /dev/ad7s1b: Invalid argument
 > files# sysctl -a | grep swapdev
 > vm.nswapdev: 4
State-Changed-From-To: open->closed 
State-Changed-By: das 
State-Changed-When: Mon Feb 24 00:52:23 PST 2003 
State-Changed-Why:  
Fixed in src/sbin/swapon/swapon.c,v 1.17. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46633 
>Unformatted:
