From owner-freebsd-fs@FreeBSD.ORG Sat Dec 10 16:51:22 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 1DF84106564A; Sat, 10 Dec 2011 16:51:22 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C63C38FC0C; Sat, 10 Dec 2011 16:51:21 +0000 (UTC) Received: by iakl21 with SMTP id l21so153779iak.13 for ; Sat, 10 Dec 2011 08:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=8CKelPdMIGo55nKkD5EMw41PXsw21yYGEHowU1YCoqU=; b=iJcVrK3FG356rg5vRw9HO3sJzNFbQQoILZEvGXHBbsW70AgdqXSz+anNcJLpaVnSjS k7pXnE7YgPf8LmzU3O8kBmNJHu6QVWsNSE888T4dI9P4oXFVFXsZTVWxGLDejv5iAKUj N7nJ4AcnNCEPCr29S4u+fc3U6CIa1n37uzd6A= MIME-Version: 1.0 Received: by 10.50.196.163 with SMTP id in3mr8062552igc.53.1323535881426; Sat, 10 Dec 2011 08:51:21 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.42.222.200 with HTTP; Sat, 10 Dec 2011 08:51:21 -0800 (PST) In-Reply-To: <201112091838.pB9IcpUe038205@chez.mckusick.com> References: <20111208134307.GA5266@thorin> <201112091838.pB9IcpUe038205@chez.mckusick.com> Date: Sat, 10 Dec 2011 17:51:21 +0100 X-Google-Sender-Auth: V86IfmCD7Pe7N6YzhHmt0PsZHbE Message-ID: From: Robert Millan To: Kirk McKusick Content-Type: text/plain; charset=UTF-8 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: Sat, 10 Dec 2011 16:51:22 -0000 2011/12/9 Kirk McKusick : > 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. Thanks for the tip, I'll prepare a new patch that includes this.