summaryrefslogtreecommitdiffstats
path: root/sbin/ggate/ggatel
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-04-02 06:59:05 +0000
committerpjd <pjd@FreeBSD.org>2011-04-02 06:59:05 +0000
commit025061f4e03d8a697012942953f4310a82d7a8ba (patch)
treeecdad3559068f968a3f46d028493ef1da4a8130d /sbin/ggate/ggatel
parent6fa8fbd0297a9b58330730ad979974ff50d3fa70 (diff)
downloadFreeBSD-src-025061f4e03d8a697012942953f4310a82d7a8ba.zip
FreeBSD-src-025061f4e03d8a697012942953f4310a82d7a8ba.tar.gz
Because ggatel(8) operates on local GEOM providers, use unlimited queue size in
GEOM GATE to fix the issue described in r220264. This also means that we no longer need -q option, remove it. Don't bother to leaving it as a no-op, as ggatel(8) is just an example utility.
Diffstat (limited to 'sbin/ggate/ggatel')
-rw-r--r--sbin/ggate/ggatel/ggatel.87
-rw-r--r--sbin/ggate/ggatel/ggatel.c15
2 files changed, 4 insertions, 18 deletions
diff --git a/sbin/ggate/ggatel/ggatel.8 b/sbin/ggate/ggatel/ggatel.8
index 01b964a..236e550 100644
--- a/sbin/ggate/ggatel/ggatel.8
+++ b/sbin/ggate/ggatel/ggatel.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 26, 2004
+.Dd April 2, 2011
.Dt GGATEL 8
.Os
.Sh NAME
@@ -35,7 +35,6 @@
.Cm create
.Op Fl v
.Op Fl o Cm ro | wo | rw
-.Op Fl q Ar queue_size
.Op Fl s Ar sectorsize
.Op Fl t Ar timeout
.Op Fl u Ar unit
@@ -100,10 +99,6 @@ or read-write
.Pq Cm rw .
Default is
.Cm rw .
-.It Fl q Ar queue_size
-Number of pending I/O requests that can be queued before they will
-start to be canceled.
-Default is 1024.
.It Fl s Ar sectorsize
Sector size for
.Nm ggate
diff --git a/sbin/ggate/ggatel/ggatel.c b/sbin/ggate/ggatel/ggatel.c
index 6a3f26e..d9e49db 100644
--- a/sbin/ggate/ggatel/ggatel.c
+++ b/sbin/ggate/ggatel/ggatel.c
@@ -53,7 +53,6 @@ static const char *path = NULL;
static int unit = G_GATE_UNIT_AUTO;
static unsigned flags = 0;
static int force = 0;
-static unsigned queue_size = G_GATE_QUEUE_SIZE;
static unsigned sectorsize = 0;
static unsigned timeout = G_GATE_TIMEOUT;
@@ -61,7 +60,7 @@ static void
usage(void)
{
- fprintf(stderr, "usage: %s create [-v] [-o <ro|wo|rw>] [-q queue_size] "
+ fprintf(stderr, "usage: %s create [-v] [-o <ro|wo|rw>] "
"[-s sectorsize] [-t timeout] [-u unit] <path>\n", getprogname());
fprintf(stderr, " %s rescue [-v] [-o <ro|wo|rw>] <-u unit> "
"<path>\n", getprogname());
@@ -182,7 +181,7 @@ g_gatel_create(void)
ggioc.gctl_sectorsize = sectorsize;
ggioc.gctl_timeout = timeout;
ggioc.gctl_flags = flags;
- ggioc.gctl_maxcount = queue_size;
+ ggioc.gctl_maxcount = 0;
strlcpy(ggioc.gctl_info, path, sizeof(ggioc.gctl_info));
g_gate_ioctl(G_GATE_CMD_CREATE, &ggioc);
if (unit == -1)
@@ -230,7 +229,7 @@ main(int argc, char *argv[])
for (;;) {
int ch;
- ch = getopt(argc, argv, "fo:q:s:t:u:v");
+ ch = getopt(argc, argv, "fo:s:t:u:v");
if (ch == -1)
break;
switch (ch) {
@@ -253,14 +252,6 @@ main(int argc, char *argv[])
"Invalid argument for '-o' option.");
}
break;
- case 'q':
- if (action != CREATE)
- usage();
- errno = 0;
- queue_size = strtoul(optarg, NULL, 10);
- if (queue_size == 0 && errno != 0)
- errx(EXIT_FAILURE, "Invalid queue_size.");
- break;
case 's':
if (action != CREATE)
usage();
OpenPOWER on IntegriCloud