From owner-freebsd-current@FreeBSD.ORG Fri Oct 7 21:22:56 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 440321065670; Fri, 7 Oct 2011 21:22:56 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id A60E28FC19; Fri, 7 Oct 2011 21:22:55 +0000 (UTC) Received: by wyj26 with SMTP id 26so5936820wyj.13 for ; Fri, 07 Oct 2011 14:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=7hcaK/GydNEB4AEMJLokJUBEEGYgf0QRyh3Q+AF+eBs=; b=s0PJPrTVKc1x3Ajd7LnZXjF5pijNVw4f+yBzzU3tfG5Jh7Y2sh0l8x/7Chct1t2ohD aPORLc3itye4w44/YMPoi8wD9u7vmnz8R8C5Wl3ys5OQsGYNLJMgNalobFkQwu4DViEy AAYUr3ZZHqeQLdPgSDYWe0oVcVkA3xOYf2WDg= MIME-Version: 1.0 Received: by 10.227.195.13 with SMTP id ea13mr2928240wbb.36.1318022574432; Fri, 07 Oct 2011 14:22:54 -0700 (PDT) Received: by 10.180.103.33 with HTTP; Fri, 7 Oct 2011 14:22:54 -0700 (PDT) In-Reply-To: <4360.1318021854@critter.freebsd.dk> References: <4360.1318021854@critter.freebsd.dk> Date: Fri, 7 Oct 2011 17:22:54 -0400 Message-ID: From: Arnaud Lacombe To: Poul-Henning Kamp Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Warren Block , Glen Barber , freebsd-current@freebsd.org, Garrett Cooper , Benjamin Kaduk Subject: Re: aliasing (or renaming) kern.geom.debugflags X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2011 21:22:56 -0000 Hi, On Fri, Oct 7, 2011 at 5:10 PM, Poul-Henning Kamp wrot= e: > In message , Warren Block= write > s: > >># mount /dev/da0p2 /mnt >># dd if=3D/tmp/FreeBSD-9.0-BETA3-amd64-memstick.img of=3D/dev/da0 bs=3D64= k >>dd: /dev/da0: Operation not permitted >># sysctl kern.geom.debugflags=3D16 >>kern.geom.debugflags: 0 -> 16 >># dd if=3D/tmp/FreeBSD-9.0-BETA3-amd64-memstick.img of=3D/dev/da0 bs=3D64= k >>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. =A0No obvious problems, but no, it's not >>polite. =A0(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: =A0You should never > need them, unless you are debugging a problem. > How about disabling debugflags=3D16'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