From owner-freebsd-current Sat Nov 7 15:03:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA19943 for freebsd-current-outgoing; Sat, 7 Nov 1998 15:03:18 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA19938 for ; Sat, 7 Nov 1998 15:03:16 -0800 (PST) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id AAA07898; Sun, 8 Nov 1998 00:01:56 +0100 (MET) Received: from semyam.dinoco.de (semyam.dinoco.de [127.0.0.1]) by semyam.dinoco.de (8.9.1/8.8.8) with ESMTP id AAA17493; Sun, 8 Nov 1998 00:01:08 +0100 (CET) (envelope-from seggers@semyam.dinoco.de) Message-Id: <199811072301.AAA17493@semyam.dinoco.de> To: Dan Swartzendruber cc: Mikhail Teterin , current@FreeBSD.ORG, seggers@semyam.dinoco.de Subject: Re: same swap twice (was Re: The infamous dying daemons bug) In-reply-to: Your message of "Sat, 07 Nov 1998 15:51:17 EST." <3.0.5.32.19981107155117.00979370@mail.kersur.net> Date: Sun, 08 Nov 1998 00:01:08 +0100 From: Stefan Eggers Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >And how do you think shall it be prevented? Making swapon know about > >partitions and compatibility slice would be insane. > > Why? Swapon operates on whatever block device you hand it. It doesn't know what slices and partitions are. Especially teaching it about slices is insane as this is a PC thing. Other machines might have the partitions only for example. It would unnecessarily add complications and depen- dencies to the VM code. The propper abstraction is a block device which does everything the VM code needs for its operation. > that you can't help but screw yourself. On the other hand, I find > it hard to believe that a simple check of "do I have block device > N/Y active as swap currently?" can possibly be that hard. And the 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. 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. It's the old compatibility slice thing which makes this imperfect. How should swapon know that your /dev/wd0b is on the same disk space as /dev/wd0s1b? They have different minor numbers after all and that's what we can check. Once we give the compatibility slice eternal rest we don't have his problem anymore. > fact that whoever closed the PR did so without apparently thinking > for more than 10 seconds about this is not real encouraging. The compatibility slice thing will go away as far as I know and the first step was also done in -stable by deamding the full name for these partitions in the fstab. Is it worth to add support for catching a rather obscure mistake which will soon not be possible anymore anyway? I can understand that nobody wants to bother with *that* as it is pretty much a waste of time and solves itself hopefully soon. Stefan. -- Stefan Eggers Lu4 yao2 zhi1 ma3 li4, Max-Slevogt-Str. 1 ri4 jiu3 jian4 ren2 xin1. 51109 Koeln Federal Republic of Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message