On 14 January 2011 ?. 23:15:13 Jason McIntyre wrote:
> On Fri, Jan 14, 2011 at 10:07:19PM +0300, Vadim Zhukov wrote:
> > On 14 January 2011 ?. 17:18:41 Alexander Hall wrote:
> > > On 01/14/11 03:12, Vadim Zhukov wrote:
> > > > +If multiplier was not specified then this value is interpreted as 
> > > > number of
> > > > +sectors (see
> > > > +.Fl S ) ,
> > > > +not number of bytes.
> > > 
> > > I'm not entirely happy with that... Maybe jmc@ can help?
> > > 
> > > I'd suggest something even simpler:
> > > 
> > > "If no multiplier is present,
> > > .Ar size
> > > represents the number of sectors (see
> > > .Fl S ) .
> > 
> > I like it. :) It's in the new version of patch.
> > 
> 
> i'd say that you'd be better leaving the description as it was (talking
> about sectors), then mentioning that a multiplier can also be used. i
> say this for a number of reasons:
> 
>       - the existing behaviour deals in sectors
>       - the description of -S will then match
>       - the mnemonic will be lost if you talk about sectors as being
>         secondary

Hm-m-m... okay, here is another try. Only manpage bits this time.

There is one question on another topic: current newfs allows to specify
sector size which is not aligned on 512-byte boundary. But kernel wants
512 byte blocks. So should be there done another rounding, errm,
round? Like "if (fs_size_in_bytes % DEV_BSIZE) fs_size_in_blocks++;"
Or should we just prohibit such sector sizes in newfs?

-- 
  Best wishes,
    Vadim Zhukov

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?



Index: newfs.8
===================================================================
RCS file: /cvs/src/sbin/newfs/newfs.8,v
retrieving revision 1.68
diff -u -p -r1.68 newfs.8
--- newfs.8     21 Mar 2010 07:51:23 -0000      1.68
+++ newfs.8     14 Jan 2011 21:39:00 -0000
@@ -230,10 +230,18 @@ from its default will make it impossible
 to find the alternate superblocks if the standard superblock is
 lost.
 .It Fl s Ar size
-The size of the file system in sectors.
-This value is multiplied by the number of 512\-byte blocks in a sector
+The size of the file system.
+The argument may contain a multiplier, as documented in
+.Xr scan_scaled 3 .
+If no multiplier is present,
+.Ar size
+represents the number of sectors (see
+.Fl S )
+and is multiplied by the number of 512\-byte blocks in a sector
 to yield the size of the file system in 512\-byte blocks, which is the value
 used by the kernel.
+Otherwise, it is rounded up to next sector boundary and then again gets
+converted to 512\-byte blocks count.
 The maximum size of an FFS file system is 2,147,483,647 (2^31 \- 1) of these
 512\-byte blocks, slightly less than 1 TB.
 FFS2 file systems can be as large as 64 PB.

Reply via email to