Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Nov 1998 15:51:17 -0500
From:      Dan Swartzendruber <dswartz@druber.com>
To:        Stefan Eggers <seggers@semyam.dinoco.de>
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:  <3.0.5.32.19981107155117.00979370@mail.kersur.net>
In-Reply-To: <199811071838.TAA07868@semyam.dinoco.de>
References:  <Your message of "Fri, 06 Nov 1998 21:04:48 EST."             <199811070204.VAA10749@xxx.video-collage.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 07:38 PM 11/7/98 +0100, Stefan Eggers wrote:
>> =It may be interesting to know that mounting the same swap paritition
>> =twice causes the exact same symptoms.
>> 
>> Some time back, I submitted a PR about ``swapon'' and/or underlying
>> calls being not picky enough to prevent this sort of mistakes from
>
>And how do you think shall it be prevented?  Making swapon know about
>partitions and compatibility slice would be insane.

Why?

>Maybe one could add functionality to the device drivers to allow
>checking for "being the same thing" which gets callend whenever the
>major device numbers are the same.  A driver not supporting this has
>all the minors being "different things" by default.
>
>The "thing" not necessarily being a partition of course as for example
>the rewinding and non-rewinding minors of a tape device driver use the
>same hardware and there this might get used for something, too.
>
>> happening. One of the gods closed the PR promptly with "Don't do it
>> then"...
>
>Maybe you want to implement it the way suggested above and do the
>testing?  A reasonably simple solution probably has a chance of
>getting added.
>
>W/o code such a PR hardly has a chance.  It's as if you complain about
>config not preventing you from creating a non-compiling kernel config.
>I once managed to do so by trying to exclude INET from a 2.2 kernel
>which failed to compile and there are numerous other ways of doing
>things wrong.
>
>Or take another example.  Put "reboot" into /boot/boot.config and it
>will be fun to watch the boot loader starting again all the time.
>Shall code be added to prevent that?  Is it worth the investment of
>time?  Probably not unless someone already has working code to do it.

I think these are in a different category from a sysadmin typing
the same name twice.  Granted there are things (like newfs and such)
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
fact that whoever closed the PR did so without apparently thinking
for more than 10 seconds about this is not real encouraging.




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?3.0.5.32.19981107155117.00979370>