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.
This commit is contained in:
Pawel Jakub Dawidek 2011-04-02 06:59:05 +00:00
parent 63a6c5c12b
commit ab9092093c
2 changed files with 4 additions and 18 deletions

View File

@ -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

View File

@ -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();