From owner-freebsd-fs@FreeBSD.ORG Fri Dec 9 18:38:51 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 9F1D0106566B; Fri, 9 Dec 2011 18:38:51 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) by mx1.freebsd.org (Postfix) with ESMTP id 7E17B8FC13; Fri, 9 Dec 2011 18:38:51 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id pB9IcpUe038205; Fri, 9 Dec 2011 10:38:51 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201112091838.pB9IcpUe038205@chez.mckusick.com> To: Robert Millan In-reply-to: <20111208134307.GA5266@thorin> Date: Fri, 09 Dec 2011 10:38:51 -0800 From: Kirk McKusick X-Spam-Status: No, score=0.0 required=5.0 tests=MISSING_MID, UNPARSEABLE_RELAY autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on chez.mckusick.com Cc: freebsd-fs@freebsd.org, Adrian Chadd 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: Fri, 09 Dec 2011 18:38:51 -0000 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. Kirk McKusick