From owner-freebsd-fs@FreeBSD.ORG Sat Dec 10 16:46:13 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 C1714106564A; Sat, 10 Dec 2011 16:46:13 +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 730978FC0A; Sat, 10 Dec 2011 16:46:13 +0000 (UTC) Received: by iakl21 with SMTP id l21so146276iak.13 for ; Sat, 10 Dec 2011 08:46:12 -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=0yZKbFJ92Oy3u+uqCIsv9BED/4a8h0H6pNMVGVbg+sY=; b=VyXzdNKYGFvcmCg9zmdslLEu4T2bGVPbBnGD76/gaWs+osxg3jErlWQuuq/KUSJZOg MIIOb0GJN2ADc/OaSx0zWdWXnnDPdPRLUOadYbyTXwQmV1RGKve+gZykFU+08C4NQRTD F3/pSN0dOOLnDCm2fNoUdmZgUVISQUfWEzPg0= MIME-Version: 1.0 Received: by 10.50.154.228 with SMTP id vr4mr8187765igb.65.1323535572841; Sat, 10 Dec 2011 08:46:12 -0800 (PST) Sender: rmh.aybabtu@gmail.com Received: by 10.42.222.200 with HTTP; Sat, 10 Dec 2011 08:46:12 -0800 (PST) In-Reply-To: <4EE221F9.9010505@gmail.com> References: <20111208134307.GA5266@thorin> <4EE221F9.9010505@gmail.com> Date: Sat, 10 Dec 2011 17:46:12 +0100 X-Google-Sender-Auth: 3qI0G0KZlExgUqohb9Zxcz3ikPs Message-ID: From: Robert Millan To: Volodymyr Kostyrko 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:46:13 -0000 2011/12/9 Volodymyr Kostyrko : > > Shouldn't it make us a coffee then? Making precautions against > shooting-the-foot is a wrong choice for me. This way we need to extend it to > support any other file system that can repair thyself upon mount in case > user mistakenly mounted the wrong one. > This suggests you don't agree with the premise that file systems need to be identifiable. We could argue about this, but note that existing behaviour is entirely consistent with this premise: - newfs stores an UFSv2 signature on disk - fsck checks for this signature and refuses to operate - newfs checks for UFSv1 signature and makes sure it is cleared out before creating a new UFSv2 - the kernel checks for UFS signature before attempting to mount a file system > What about drives that support SSD? Isn't it convenient to use TRIM in such > cases? As I'm quite unfamiliar with SSD, I'd rather have someone else answer that. My impression, however, is that this improvement would most likely belong in berase() and be completely orthogonal to my patch. > You messing up ZFS terminology a bit. Uberblock size is 1k and what you > refer is ZFS vdev label. Size of vdev label is 256k. There are four vdev > labels for each vdev - two at the beginning of the vdev and two at the end. Ah yes, I probably confused the concepts, I was working from memory and it's been a while since I read the spec. > All vdev labels are _aligned_ to 256k. So technically this is not just last > 512k. I see that you mean. I guess just aligning down "mediasize" to 256 kiB before using it would suffice?