summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2015-09-15 18:01:59 +0000
committertrasz <trasz@FreeBSD.org>2015-09-15 18:01:59 +0000
commit58cf716bce21902db0ae2ec499fbb137024912f7 (patch)
tree168141c0c2f0b348ba172d7edaf08dfc23ada1ca /sbin
parentf6e576f283d7757300b74bd85a22876b22a1cea3 (diff)
downloadFreeBSD-src-58cf716bce21902db0ae2ec499fbb137024912f7.zip
FreeBSD-src-58cf716bce21902db0ae2ec499fbb137024912f7.tar.gz
Add a way to specify stripesize and stripeoffset to gnop(8). This makes
it possible to "simulate" 4K media, to eg test alignment handling. Reviewed by: mav@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3664
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 4770090..c83c2f5 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