Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Nov 1998 00:01:08 +0100
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        Dan Swartzendruber <dswartz@druber.com>
Cc:        Mikhail Teterin <mi@video-collage.com>, current@FreeBSD.ORG, seggers@semyam.dinoco.de
Subject:   Re: same swap twice (was Re: The infamous dying daemons bug) 
Message-ID:  <199811072301.AAA17493@semyam.dinoco.de>
In-Reply-To: Your message of "Sat, 07 Nov 1998 15:51:17 EST." <3.0.5.32.19981107155117.00979370@mail.kersur.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >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



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