Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jan 2009 01:22:06 -0600
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        Danny Braniss <danny@cs.huji.ac.il>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: newfs(8) parameters from "dumpfs -m" have bad -s value?
Message-ID:  <20090106072205.GA41950@keira.kiwi-computer.com>
In-Reply-To: <E1LK5mY-0008AF-R5@kabab.cs.huji.ac.il>
References:  <20090102153455.GR4100@albert.catwhisker.org> <200901051923.n05JNrwt038325@lurza.secnetix.de> <20090105221352.GB35524@keira.kiwi-computer.com> <E1LK5mY-0008AF-R5@kabab.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090106072205.GA41950>