Skip to content

Commit

Permalink
Consistentify miscellaneous style on remaining manpages
Browse files Browse the repository at this point in the history
Most notably this fixes the vdev_id(8) non-.Xrs in vdev_id.conf.5

Signed-off-by: Ahelenia Ziemiańska <[email protected]>
  • Loading branch information
nabijaczleweli committed Jun 4, 2021
1 parent 2dd557a commit 10f0fc9
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 67 deletions.
16 changes: 9 additions & 7 deletions man/man1/arcstat.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl havxp
.Op Fl f Ar field Ns Op , Ns Ar field Ns ...
.Op Fl f Ar field Ns Op , Ns Ar field Ns
.Op Fl o Ar file
.Op Fl s Ar string
.Op Ar interval
Expand All @@ -31,7 +31,7 @@
.Sh DESCRIPTION
.Nm
prints various ZFS ARC and L2ARC statistics in vmstat-like fashion:
.Bl -tag -width "l2asize"
.Bl -tag -compact -offset Ds -width "l2asize"
.It Sy c
ARC target size
.It Sy dh%
Expand Down Expand Up @@ -155,7 +155,7 @@ Print all possible stats.
.It Fl f
Display only specific fields.
See
.Sy DESCRIPTION
.Sx DESCRIPTION
for supported statistics.
.It Fl h
Display help message.
Expand All @@ -166,17 +166,19 @@ Disable auto-scaling of numerical fields (for raw, machine-parsable values).
.It Fl s
Display data with a specified separator (default: 2 spaces).
.It Fl x
Print extended stats (same as
.Fl f Ar time,mfu,mru,mfug,mrug,eskip,mtxmis,dread,pread,read Ns No ).
Print extended stats
.Pq same as Fl f Sy time , Ns Sy mfu , Ns Sy mru , Ns Sy mfug , Ns Sy mrug , Ns Sy eskip , Ns Sy mtxmis , Ns Sy dread , Ns Sy pread , Ns Sy read .
.It Fl v
Show field headers and definitions
.El
.
.Sh OPERANDS
The following operands are supported:
.Bl -tag -width "interval"
.Bl -tag -compact -offset Ds -width "interval"
.It Ar interval
Specify the sampling interval in seconds.
.It Ar count
Display only \fIcount\fR reports.
Display only
.Ar count
reports.
.El
21 changes: 10 additions & 11 deletions man/man1/cstyle.1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.Nm
.Op Fl chpvCP
.Op Fl o Ar construct Ns Op , Ns Ar construct Ns
.Op Ar file…
.Oo Ar file Oc Ns
.Sh DESCRIPTION
.Nm
inspects C source files (*.c and *.h) for common stylistic errors.
Expand Down Expand Up @@ -99,7 +99,7 @@ Allow doxygen-style block comments
.Pq Sy /** No and Sy /*!\& .
.It Sy splint
Allow splint-style lint comments
.Pq Sy /*@...@*/ .
.Pq Sy /*@ Ns ... Ns Sy @*/ .
.El
.El
.
Expand All @@ -118,43 +118,42 @@ statement has balanced parenthesis.
.It
Some
.Xr cpp 1
macros do not require \fB;\fPs after them.
macros do not require
.Sy ;\& Ns s after them.
Any such macros
.Em must
be ALL_CAPS; any lower case letters will cause bad output.
.Pp
The bad output will generally be corrected after the next \fB;\fP,
.Sy { ,
or
.Sy } .
The bad output will generally be corrected after the next
.Sy ;\& , { , No or Sy } .
.El
Some continuation error messages deserve some additional explanation:
.Bl -tag -width Ds
.It Sy multiple statements continued over multiple lines
A multi-line statement which is not broken at statement boundaries.
For example:
.Bd -literal
.Bd -literal -compact -offset Ds
if (this_is_a_long_variable == another_variable) a =
b + c;
.Ed
.Pp
Will trigger this error.
Instead, do:
.Bd -literal
.Bd -literal -compact -offset Ds
if (this_is_a_long_variable == another_variable)
a = b + c;
.Ed
.It Sy empty if/for/while body not on its own line
For visibility, empty bodies for if, for, and while statements should be
on their own line.
For example:
.Bd -literal
.Bd -literal -compact -offset Ds
while (do_something(&x) == 0);
.Ed
.Pp
Will trigger this error.
Instead, do:
.Bd -literal
.Bd -literal -compact -offset Ds
while (do_something(&x) == 0)
;
.Ed
Expand Down
28 changes: 14 additions & 14 deletions man/man1/raidz_test.1
Original file line number Diff line number Diff line change
Expand Up @@ -50,44 +50,44 @@ option.
.Bl -tag -width "-B(enchmark)"
.It Fl h
Print a help summary.
.It Fl a Ar ashift No (default: Sy 9 )
.It Fl a Ar ashift Pq default: Sy 9
Ashift value.
.It Fl o Ar zio_off_shift No (default: Sy 0 )
.It Fl o Ar zio_off_shift Pq default: Sy 0
ZIO offset for each raidz block.
The offset's value is
.Sy 1 << zio_off_shift .
.It Fl d Ar raidz_data_disks No (default: Sy 8 )
.Em 2^zio_off_shift .
.It Fl d Ar raidz_data_disks Pq default: Sy 8
Number of raidz data disks to use.
Additional disks will be used for parity.
.It Fl s Ar zio_size_shift No (default: Sy 19 )
.It Fl s Ar zio_size_shift Pq default: Sy 19
Size of data for raidz block.
The real size is
.Sy 1 << zio_size_shift .
.It Fl r Ar reflow_offset No (default: Sy uint max )
.Em 2^zio_size_shift .
.It Fl r Ar reflow_offset Pq default: Sy uint max
Set raidz expansion offset.
The expanded raidz map allocation function will
produce different map configurations depending on this value.
.It Fl S Ns No (weep)
.It Fl S Ns Pq weep
Sweep parameter space while verifying the raidz implementations.
This option
will exhaust all most of valid values for the
.Fl aods
options.
Runtime using this option will be long.
.It Fl t Ns No (imeout)
.It Fl t Ns Pq imeout
Wall time for sweep test in seconds.
The actual runtime could be longer.
.It Fl B Ns No (enchmark)
.It Fl B Ns Pq enchmark
All implementations are benchmarked using increasing per disk data size.
Results are given as throughput per disk, measured in MiB/s.
.It Fl e Ns No (xpansion)
.It Fl e Ns Pq xpansion
Use expanded raidz map allocation function.
.It Fl v Ns No (erbose)
.It Fl v Ns Pq erbose
Increase verbosity.
.It Fl T Ns No (est the test)
.It Fl T Ns Pq est the test
Debugging option: fail all tests.
This is to check if tests would properly verify bit-exactness.
.It Fl D Ns No (ebug)
.It Fl D Ns Pq ebug
Debugging option: attach
.Xr gdb 1
when
Expand Down
17 changes: 9 additions & 8 deletions man/man1/zhack.1
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ which is dangerous and can cause data corruption.
.Bl -tag -width Ds
.It Xo
.Nm zhack
.Cm feature stat
.Cm feature
.Cm stat
.Ar pool
.Xc
List feature flags.
.
.It Xo
.Nm zhack
.Cm feature enable
.Cm feature
.Cm enable
.Op Fl d Ar description
.Op Fl r
.Ar pool
Expand Down Expand Up @@ -71,7 +73,8 @@ feature.
.
.It Xo
.Nm zhack
.Cm feature ref
.Cm feature
.Cm ref
.Op Fl d Ns | Ns Fl m
.Ar pool
.Ar guid
Expand Down Expand Up @@ -119,7 +122,7 @@ Can be specified more than once.
.
.Sh EXAMPLES
.Bd -literal
# zhack feature stat tank
.No # Nm zhack Cm feature stat Ar tank
for_read_obj:
org.illumos:lz4_compress = 0
for_write_obj:
Expand All @@ -130,10 +133,8 @@ descriptions_obj:
com.delphix:empty_bpobj = Snapshots use less space.
org.illumos:lz4_compress = LZ4 compression algorithm support.

# zhack feature enable -d 'Predict future disk failures.' \\
tank com.example:clairvoyance

# zhack feature ref tank com.example:clairvoyance
.No # Nm zhack Cm feature enable Fl d No 'Predict future disk failures.' Ar tank com.example:clairvoyance
.No # Nm zhack Cm feature ref Ar tank com.example:clairvoyance
.Ed
.
.Sh SEE ALSO
Expand Down
38 changes: 18 additions & 20 deletions man/man5/vdev_id.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
.
.Sh NAME
.Nm vdev_id.conf
.Nd Configuration file for vdev_id
.Nd configuration file for vdev_id(8)
.Sh DESCRIPTION
.Nm
is the configuration file for
.Nm vdev_id Ns Sy (8) .
.Xr vdev_id 8 .
It controls the default behavior of
.Nm vdev_id Ns Sy (8)
.Xr vdev_id 8
while it is mapping a disk device name to an alias.
.Pp
The
Expand All @@ -37,7 +37,7 @@ Maps a device link in the
.Pa /dev
directory hierarchy to a new device name.
The udev rule defining the device link must have run prior to
.Nm vdev_id Ns Sy (8) .
.Xr vdev_id 8 .
A defined alias takes precedence over a topology-derived name, but the
two naming methods can otherwise coexist.
For example, one might name drives in a JBOD with the
Expand Down Expand Up @@ -94,12 +94,12 @@ and a default mapping applied to the others.
.
.It Sy multipath Sy yes Ns | Ns Sy no
Specifies whether
.Nm vdev_id Ns Sy (8)
.Xr vdev_id 8
will handle only dm-multipath devices.
If set to
.Sy yes
then
.Nm vdev_id Ns Sy (8)
.Xr vdev_id 8
will examine the first running component disk of a dm-multipath
device as provided by the driver command to determine the physical path.
.
Expand All @@ -116,7 +116,7 @@ channels are uniquely identified by a SAS switch port number
.It Sy phys_per_port Ar num
Specifies the number of PHY devices associated with a SAS HBA port or SAS
switch port.
.Nm vdev_id Ns Sy (8)
.Xr vdev_id 8
internally uses this value to determine which HBA or switch port a
device is connected to.
The default is
Expand Down Expand Up @@ -157,13 +157,13 @@ may be unstable across disk replacement.
.Bl -tag -width "-v v"
.It Pa /etc/zfs/vdev_id.conf
The configuration file for
.Nm vdev_id Ns Sy (8) .
.Xr vdev_id 8 .
.El
.
.Sh EXAMPLES
A non-multipath configuration with direct-attached SAS enclosures and an
arbitrary slot re-mapping:
.Bd -literal -offset Ds
.Bd -literal -compact -offset Ds
multipath no
topology sas_direct
phys_per_port 4
Expand Down Expand Up @@ -195,8 +195,8 @@ slot 4 3
A SAS-switch topology.
Note, that the
.Ar channel
keyword takes only two arguments in this example.
.Bd -literal -offset Ds
keyword takes only two arguments in this example:
.Bd -literal -compact -offset Ds
topology sas_switch

# SWITCH PORT CHANNEL NAME
Expand All @@ -207,9 +207,8 @@ channel 4 D
.Ed
.Pp
A multipath configuration.
Note that channel names have multiple
definitions - one per physical path.
.Bd -literal -offset Ds
Note that channel names have multiple definitions - one per physical path:
.Bd -literal -compact -offset Ds
multipath yes

# PCI_SLOT HBA PORT CHANNEL NAME
Expand All @@ -219,8 +218,8 @@ channel 86:00.0 1 A
channel 86:00.0 0 B
.Ed
.Pp
A configuration with enclosure_symlinks enabled.
.Bd -literal -offset Ds
A configuration with enclosure_symlinks enabled:
.Bd -literal -compact -offset Ds
multipath yes
enclosure_symlinks yes

Expand All @@ -230,17 +229,16 @@ channel 05:00.0 0 L
channel 06:00.0 1 U
channel 06:00.0 0 L
.Ed
.Pp
In addition to the disks symlinks, this configuration will create:
.Bd -literal -offset Ds
.Bd -literal -compact -offset Ds
/dev/by-enclosure/enc-L0
/dev/by-enclosure/enc-L1
/dev/by-enclosure/enc-U0
/dev/by-enclosure/enc-U1
.Ed
.Pp
A configuration using device link aliases.
.Bd -literal -offset Ds
A configuration using device link aliases:
.Bd -literal -compact -offset Ds
# by-vdev
# name fully qualified or base name of device link
alias d1 /dev/disk/by-id/wwn-0x5000c5002de3b9ca
Expand Down
8 changes: 6 additions & 2 deletions man/man8/fsck.zfs.8
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ interface still allows it to communicate some errors: if the
.Ar dataset
is in a degraded pool, then
.Nm
will return exit code 4 to indicate an uncorrected filesystem error.
will return exit code
.Sy 4
to indicate an uncorrected filesystem error.
.Pp
Similarly, if the
.Ar dataset
is in a faulted pool and has a legacy
.Pa /etc/fstab
record, then
.Nm
will return exit code 8 to indicate a fatal operational error.
will return exit code
.Sy 8
to indicate a fatal operational error.
.Sh SEE ALSO
.Xr fstab 5 ,
.Xr fsck 8 ,
Expand Down
Loading

0 comments on commit 10f0fc9

Please sign in to comment.