Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Nov 1998 00:17:05 +0000 (GMT)
From:      Mikhail Teterin <mi@aldan.algebra.com>
To:        current@FreeBSD.ORG
Subject:   Re: same swap twice (was Re: The infamous dying daemons bug)
Message-ID:  <199811080017.AAA17617@aldan.algebra.com>
In-Reply-To: <199811072301.AAA17493@semyam.dinoco.de> from Stefan Eggers at "Nov 8, 1998 00:01:08 am"

next in thread | previous in thread | raw e-mail | index | archive | help

Stefan Eggers once stated:

=This simple check is in the code as far as I know and remember and
=is in -stable, too.  If not adding it were a matter of minutes.

Yes, it already prevents you from adding the exact same device.

=The trouble maker was swapping to /dev/wd0b and /dev/wd0s1b at the
=same time which is a different thing as comparing major and minor
=device numbers is not enough in this case.

I thought, the swapon, or, rather, whatever the kernel code it
triggers, can look at the new partition's content and check of it
is already being paged onto. Another possibly even more usefull
precautions would be to check if the partition is marked as swap
in the disklabel (if any), and, may be, does it look like a
filesystem.

	-mi

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811080017.AAA17617>