From owner-freebsd-stable@FreeBSD.ORG Tue Jan 6 07:22:07 2009 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C3E91065679 for ; Tue, 6 Jan 2009 07:22:07 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 215B88FC2A for ; Tue, 6 Jan 2009 07:22:06 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 42020 invoked by uid 2001); 6 Jan 2009 07:22:06 -0000 Date: Tue, 6 Jan 2009 01:22:06 -0600 From: "Rick C. Petty" To: Danny Braniss Message-ID: <20090106072205.GA41950@keira.kiwi-computer.com> References: <20090102153455.GR4100@albert.catwhisker.org> <200901051923.n05JNrwt038325@lurza.secnetix.de> <20090105221352.GB35524@keira.kiwi-computer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-stable@FreeBSD.ORG Subject: Re: newfs(8) parameters from "dumpfs -m" have bad -s value? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 07:22:07 -0000 On Tue, Jan 06, 2009 at 08:51:18AM +0200, Danny Braniss wrote: > > > > Everything is converted to number of media sectors (sector size as > > specified by the device). So one could assume for dumpfs to always use > > 512, since it's rarely different, and multiply fs_size by fs_fsize and > > divide by 512, and then output "-S 512". > > don't assume 512, in the iscsi world I have seen all kinds of sector sizes, > making it a PITA to get things right. It was a suggestion, one assumed by FreeBSD in many places. In this case, it makes no difference since the number of bytes is computed by newfs and then divided by the actual sector size when calling bwrite(3). I still would prefer: > > Better yet would be to add a parameter ("-z" perhaps) to newfs(8) to accept > > number of bytes instead of multiples of sectorsize. -- Rick C. Petty