From 63f88c12b41a9a51f5693efce408960664fdbe16 Mon Sep 17 00:00:00 2001 From: LOLi Date: Tue, 30 Jan 2018 00:05:03 +0100 Subject: [PATCH] Fix style issues in man pages and commands help * Remove 'zfs snap' from zfs help message (OpenZFS sync) * Update zfs(8) to suggest 'snap' can be used as an alias for 'snapshot' * Enforce 80 columns limit in help messages * Remove zfs_disable_dup_eviction from zfs-module-parameters(5) * Expose zfs_scan_max_ext_gap as a kernel module parameter. Reviewed-by: Giuseppe Di Natale Reviewed by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: Tom Caputi Signed-off-by: loli10K Closes #7087 --- cmd/zdb/zdb.c | 4 ++-- cmd/zfs/zfs_main.c | 2 +- cmd/zpool/zpool_main.c | 6 ++++-- man/man5/zfs-module-parameters.5 | 11 ----------- man/man8/zfs.8 | 5 ++++- module/zfs/dsl_scan.c | 7 ++++++- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 1415be864..3719d22e1 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -131,8 +131,8 @@ usage(void) "[-I ]\n" "\t\t[-o =]... [-t ] [-U ] [-x ]\n" "\t\t[ [ ...]]\n" - "\t%s [-AdiPv] [-e [-V] [-p ...]] [-U ] " - "[ ...]\n" + "\t%s [-AdiPv] [-e [-V] [-p ...]] [-U ] \n" + "\t\t[ ...]\n" "\t%s -C [-A] [-U ]\n" "\t%s -l [-Aqu] \n" "\t%s -m [-AFLPX] [-e [-V] [-p ...]] [-t ] " diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 924a4d4aa..fa1a5d9fd 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -286,7 +286,7 @@ get_usage(zfs_help_t idx) case HELP_SHARE: return (gettext("\tshare [-l] <-a [nfs|smb] | filesystem>\n")); case HELP_SNAPSHOT: - return (gettext("\tsnapshot|snap [-r] [-o property=value] ... " + return (gettext("\tsnapshot [-r] [-o property=value] ... " "@ ...\n")); case HELP_UNMOUNT: return (gettext("\tunmount [-f] " diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 4905927fc..f8d3a75bd 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -334,7 +334,8 @@ get_usage(zpool_help_t idx) return (gettext("\tlabelclear [-f] \n")); case HELP_LIST: return (gettext("\tlist [-gHLpPv] [-o property[,...]] " - "[-T d|u] [pool] ... [interval [count]]\n")); + "[-T d|u] [pool] ... \n" + "\t [interval [count]]\n")); case HELP_OFFLINE: return (gettext("\toffline [-f] [-t] ...\n")); case HELP_ONLINE: @@ -350,7 +351,8 @@ get_usage(zpool_help_t idx) return (gettext("\tscrub [-s | -p] ...\n")); case HELP_STATUS: return (gettext("\tstatus [-c [script1,script2,...]] [-gLPvxD]" - "[-T d|u] [pool] ... [interval [count]]\n")); + "[-T d|u] [pool] ... \n" + "\t [interval [count]]\n")); case HELP_UPGRADE: return (gettext("\tupgrade\n" "\tupgrade -v\n" diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5 index 039e024bb..a5c83b422 100644 --- a/man/man5/zfs-module-parameters.5 +++ b/man/man5/zfs-module-parameters.5 @@ -1253,17 +1253,6 @@ See also \fBzio_dva_throttle_enabled\fR. Default value: \fB1000\fR%. .RE -.sp -.ne 2 -.na -\fBzfs_disable_dup_eviction\fR (int) -.ad -.RS 12n -Disable duplicate buffer eviction -.sp -Use \fB1\fR for yes and \fB0\fR for no (default). -.RE - .sp .ne 2 .na diff --git a/man/man8/zfs.8 b/man/man8/zfs.8 index 85f510d36..4723de45d 100644 --- a/man/man8/zfs.8 +++ b/man/man8/zfs.8 @@ -2459,7 +2459,7 @@ The given bookmark is destroyed. .Nm .Cm snapshot .Op Fl r -.Oo Fl o Ar property Ns = Ns value Oc Ns ... +.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... .Xc Creates snapshots with the given names. @@ -2467,6 +2467,9 @@ All previous modifications by successful system calls to the file system are part of the snapshots. Snapshots are taken atomically, so that all snapshots correspond to the same moment in time. +.Nm zfs Cm snap +can be used as an alias for +.Nm zfs Cm snapshot. See the .Sx Snapshots section for details. diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 2231ef1c0..4b4f1665c 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -147,7 +147,7 @@ unsigned long zfs_scan_vdev_limit = 4 << 20; int zfs_scan_issue_strategy = 0; int zfs_scan_legacy = B_FALSE; /* don't queue & sort zios, go direct */ -uint64_t zfs_scan_max_ext_gap = 2 << 20; /* in bytes */ +unsigned long zfs_scan_max_ext_gap = 2 << 20; /* in bytes */ /* * fill_weight is non-tunable at runtime, so we copy it at module init from @@ -3886,6 +3886,11 @@ module_param(zfs_scan_checkpoint_intval, int, 0644); MODULE_PARM_DESC(zfs_scan_checkpoint_intval, "Scan progress on-disk checkpointing interval"); +/* CSTYLED */ +module_param(zfs_scan_max_ext_gap, ulong, 0644); +MODULE_PARM_DESC(zfs_scan_max_ext_gap, + "Max gap in bytes between sequential scrub / resilver I/Os"); + module_param(zfs_scan_mem_lim_soft_fact, int, 0644); MODULE_PARM_DESC(zfs_scan_mem_lim_soft_fact, "Fraction of hard limit used as soft limit"); -- 2.40.0