On 15 January 2011 ?. 01:24:57 Jason McIntyre wrote:
> On Sat, Jan 15, 2011 at 12:42:03AM +0300, Vadim Zhukov wrote:
> > > 
> > >   - 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.
> > 
> 
> no, i meant like below:
> 
> > 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
> 
>       .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
>       ...
>       used by the kernel.
>       Alternatively
>       .Ar size
>       may instead use a multiplier, as documented in
>       .Xr scan_scaled.
>       The maximum size...
> 
> does that make sense?

It's obvious now, who is native English speaker, and who is not. ;)
The phrase "The argument may contain a multiplier, as documented in
scan_scaled" was taken from smtpd.conf(5) - I thought it was OK to
re-use it here unchanged. Sorry if your eyes suffered a little. :)

The problem is that I had to re-read phrase "This value is multiplied
by the number of 512-byte blocks in a sector" a few times, until
realized what it means. Alexander, did you mean this too when said
"It just confused me"? Maybe it's better to talk about device
blocks separately?

Anyway, another man page patch proposal below. Looks simple. :)

-- 
  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 23:15:29 -0000
@@ -218,6 +218,8 @@ With this option,
 will not print extraneous information like superblock backups.
 .It Fl S Ar sector-size
 The size of a sector in bytes (almost always 512).
+The argument may contain a multiplier, as documented in
+.Xr scan_scaled 3 .
 A sector is the smallest addressable unit on the physical device.
 Changing this is useful only when using
 .Nm
@@ -234,6 +236,14 @@ The size of the file system in sectors.
 This value 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.
+Alternatively
+.Ar size
+may instead use a multiplier, as documented in
+.Xr scan_scaled 3 .
+In the latter case
+.Ar size
+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