Re: aliasing (or renaming) kern.geom.debugflags

From: Arnaud Lacombe <lacombar_at_gmail.com>
Date: Fri, 7 Oct 2011 17:22:54 -0400
Hi,

On Fri, Oct 7, 2011 at 5:10 PM, Poul-Henning Kamp <phk_at_phk.freebsd.dk> wrote:
> In message <alpine.BSF.2.00.1110071352210.2450_at_wonkity.com>, Warren Block write
> s:
>
>># mount /dev/da0p2 /mnt
>># dd if=/tmp/FreeBSD-9.0-BETA3-amd64-memstick.img of=/dev/da0 bs=64k
>>dd: /dev/da0: Operation not permitted
>># sysctl kern.geom.debugflags=16
>>kern.geom.debugflags: 0 -> 16
>># dd if=/tmp/FreeBSD-9.0-BETA3-amd64-memstick.img of=/dev/da0 bs=64k
>>10463+1 records in
>>10463+1 records out
>>685731840 bytes transferred in 52.915362 secs (12959031 bytes/sec)
>>
>>Followed by removing the memory stick without unmounting it to avoid
>>overwriting part of the image.  No obvious problems, but no, it's not
>>polite.  (I'm thinking "automounter" here.)
>
> And you are sure the stick now contains what you expect ?
>
> If the dirty filesystem had blocks to write, it might have done so...
>
> debugflags are called debugflags for a reason:  You should never
> need them, unless you are debugging a problem.
>
How about disabling debugflags=16's action unless for DIAGNOSTICS kernel ?

If you expose a setting, you cannot rely on a user not to use it even
if you told him not to. As long as this is exposed and usable, it will
be used, even more when it was documented.

 - Arnaud
Received on Fri Oct 07 2011 - 19:22:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:18 UTC