summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-10-18 15:02:07 +0000
committertrasz <trasz@FreeBSD.org>2015-10-18 15:02:07 +0000
commitd6b9751caa717b8d02a00cafb7977c10b0b24cac (patch)
tree6434c089b638829b51031f7231aec39cf56d7e45 /sbin
parent669694f0678ab1c67d085d94eba43fcd56be66ef (diff)
downloadFreeBSD-src-d6b9751caa717b8d02a00cafb7977c10b0b24cac.zip
FreeBSD-src-d6b9751caa717b8d02a00cafb7977c10b0b24cac.tar.gz
MFC r287827:
Add a way to specify stripesize and stripeoffset to gnop(8). This makes it possible to "simulate" 4K media, to eg test alignment handling. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/class/nop/geom_nop.c6
-rw-r--r--sbin/geom/class/nop/gnop.88
2 files changed, 11 insertions, 3 deletions
diff --git a/sbin/geom/class/nop/geom_nop.c b/sbin/geom/class/nop/geom_nop.c
index 25163cc..f05a522 100644
--- a/sbin/geom/class/nop/geom_nop.c
+++ b/sbin/geom/class/nop/geom_nop.c
@@ -43,14 +43,16 @@ struct g_command class_commands[] = {
{
{ 'e', "error", "-1", G_TYPE_NUMBER },
{ 'o', "offset", "0", G_TYPE_NUMBER },
+ { 'p', "stripesize", "0", G_TYPE_NUMBER },
+ { 'P', "stripeoffset", "0", G_TYPE_NUMBER },
{ 'r', "rfailprob", "-1", G_TYPE_NUMBER },
{ 's', "size", "0", G_TYPE_NUMBER },
{ 'S', "secsize", "0", G_TYPE_NUMBER },
{ 'w', "wfailprob", "-1", G_TYPE_NUMBER },
G_OPT_SENTINEL
},
- "[-v] [-e error] [-o offset] [-r rfailprob] [-s size] "
- "[-S secsize] [-w wfailprob] dev ..."
+ "[-v] [-e error] [-o offset] [-p stripesize] [-P stripeoffset] "
+ "[-r rfailprob] [-s size] [-S secsize] [-w wfailprob] dev ..."
},
{ "configure", G_FLAG_VERBOSE, NULL,
{
diff --git a/sbin/geom/class/nop/gnop.8 b/sbin/geom/class/nop/gnop.8
index 2bcbef3..0103579 100644
--- a/sbin/geom/class/nop/gnop.8
+++ b/sbin/geom/class/nop/gnop.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 14, 2013
+.Dd September 15, 2015
.Dt GNOP 8
.Os
.Sh NAME
@@ -36,6 +36,8 @@
.Op Fl v
.Op Fl e Ar error
.Op Fl o Ar offset
+.Op Fl p Ar stripesize
+.Op Fl P Ar stripeoffset
.Op Fl r Ar rfailprob
.Op Fl s Ar size
.Op Fl S Ar secsize
@@ -115,6 +117,10 @@ Specifies the error number to return on failure.
Force the removal of the specified provider.
.It Fl o Ar offset
Where to begin on the original provider.
+.It Fl p Ar stripesize
+Value of the stripesize property of the transparent provider.
+.It Fl P Ar stripeoffset
+Value of the stripeoffset property of the transparent provider.
.It Fl r Ar rfailprob
Specifies read failure probability in percent.
.It Fl s Ar size
OpenPOWER on IntegriCloud