aboutsummaryrefslogtreecommitdiff
path: root/lib/geom
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2019-12-29 15:40:02 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2019-12-29 15:40:02 +0000
commit80e63e0a9023ba28d73c3753002726674835e414 (patch)
tree120706b013489fa3952f6e42606f6d6d3ef5d230 /lib/geom
parent9b888dd9bd72776e7270d2e7e53d7798a61e0a21 (diff)
downloadsrc-80e63e0a9023ba28d73c3753002726674835e414.tar.gz
src-80e63e0a9023ba28d73c3753002726674835e414.zip
gnop: allow to change the name of created device
Thanks to this option we can create more then one gnop provider from single provider. This may be useful for temporary labeling some data on the disk. Reviewed by: markj, allanjude, bcr Differential Revision: https://reviews.freebsd.org/D22304
Notes
Notes: svn path=/head/; revision=356174
Diffstat (limited to 'lib/geom')
-rw-r--r--lib/geom/nop/geom_nop.c3
-rw-r--r--lib/geom/nop/gnop.88
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/geom/nop/geom_nop.c b/lib/geom/nop/geom_nop.c
index 346a721d3127..0ba78f8d76f2 100644
--- a/lib/geom/nop/geom_nop.c
+++ b/lib/geom/nop/geom_nop.c
@@ -56,12 +56,13 @@ struct g_command class_commands[] = {
{ 'w', "wfailprob", "-1", G_TYPE_NUMBER },
{ 'x', "wdelayprob", "-1", G_TYPE_NUMBER },
{ 'z', "physpath", G_NOP_PHYSPATH_PASSTHROUGH, G_TYPE_STRING },
+ { 'Z', "gnopname", G_VAL_OPTIONAL, G_TYPE_STRING },
G_OPT_SENTINEL
},
"[-v] [-c count_until_fail] [-d delaymsec] [-e error] [-o offset] "
"[-p stripesize] [-P stripeoffset] [-q rdelayprob] [-r rfailprob] "
"[-s size] [-S secsize] [-w wfailprob] [-x wdelayprob] "
- "[-z physpath] dev ..."
+ "[-z physpath] [-Z gnopname] dev ..."
},
{ "configure", G_FLAG_VERBOSE, NULL,
{
diff --git a/lib/geom/nop/gnop.8 b/lib/geom/nop/gnop.8
index 12e609728566..21efb64a415e 100644
--- a/lib/geom/nop/gnop.8
+++ b/lib/geom/nop/gnop.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 13, 2019
+.Dd December 29, 2019
.Dt GNOP 8
.Os
.Sh NAME
@@ -47,6 +47,7 @@
.Op Fl w Ar wfailprob
.Op Fl x Ar wdelayprob
.Op Fl z Ar physpath
+.Op Fl Z Ar gnopname
.Ar dev ...
.Nm
.Cm configure
@@ -153,6 +154,11 @@ Be more verbose.
Specifies write delay probability in percent.
.It Fl z Ar physpath
Physical path of the transparent provider.
+.It Fl Z Ar gnopname
+The name of the new provider.
+The suffix
+.Dq .nop
+will be appended to the provider name.
.El
.Sh SYSCTL VARIABLES
The following