newfs(8) parameters from "dumpfs -m" have bad -s value?

Rick C. Petty rick-freebsd2008 at kiwi-computer.com
Tue Jan 6 07:22:07 UTC 2009


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


More information about the freebsd-stable mailing list