From owner-freebsd-fs@FreeBSD.ORG Sat Dec 10 14:39:56 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18BE91065672 for ; Sat, 10 Dec 2011 14:39:56 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id C77AF8FC12 for ; Sat, 10 Dec 2011 14:39:55 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RZO5i-0008QT-FH for freebsd-fs@freebsd.org; Sat, 10 Dec 2011 15:39:54 +0100 Received: from dyn1247-198.vpn.ic.ac.uk ([129.31.247.198]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Dec 2011 15:39:54 +0100 Received: from johannes by dyn1247-198.vpn.ic.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Dec 2011 15:39:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Johannes Totz Date: Sat, 10 Dec 2011 14:39:41 +0000 Lines: 18 Message-ID: References: <20111208134307.GA5266@thorin> <201112091838.pB9IcpUe038205@chez.mckusick.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dyn1247-198.vpn.ic.ac.uk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: <201112091838.pB9IcpUe038205@chez.mckusick.com> Subject: Re: [PATCH] Wipe other file systems when creating new UFS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Dec 2011 14:39:56 -0000 On 09/12/2011 18:38, Kirk McKusick wrote: > Generally speaking, I am in agreement with what you are trying to do. > However, you should not get rid of the check for (and the erasing of) > the UFS1 superblock. By default, UFS2 puts its superblock at an offset > of 64K from the beginning of the partition. You then eraseup to 512K > after that point which is reasonable since on a UFS2 filesystem the > first 64K can be used for the bootstrap. However, UFS1 places its > superblock at 8K from the beginning of the partition. You will not > wipe it out if it exists and its existence (if it has not been > overwritten by a bootstrap) can be quite problematic. Hence the > current code that checks for its existence, and only if found its > being wiped out. Naive question here: why not wipe the first and last few megabytes? Better safe than sorry... Also would be good to document the cases this is supposed to catch *in the code*. So that is does not get forgotten.