3306 zdb should be able to issue reads in parallel
3321 'zpool reopen' command should be documented in the man
     page and help

Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by: Christopher Siden <chris.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>

References:
  illumos/illumos-gate@31d7e8fa33
  https://www.illumos.org/issues/3306
  https://www.illumos.org/issues/3321

The vdev_file.c implementation in this patch diverges significantly
from the upstream version.  For consistenty with the vdev_disk.c
code the upstream version leverages the Illumos bio interfaces.
This makes sense for Illumos but not for ZoL for two reasons.

1) The vdev_disk.c code in ZoL has been rewritten to use the
   Linux block device interfaces which differ significantly
   from those in Illumos.  Therefore, updating the vdev_file.c
   to use the Illumos interfaces doesn't get you consistency
   with vdev_disk.c.

2) Using the upstream patch as is would requiring implementing
   compatibility code for those Solaris block device interfaces
   in user and kernel space.  That additional complexity could
   lead to confusion and doesn't buy us anything.

For these reasons I've opted to simply move the existing vn_rdwr()
as is in to the taskq function.  This has the advantage of being
low risk and easy to understand.  Moving the vn_rdwr() function
in to its own taskq thread also neatly avoids the possibility of
a stack overflow.

Finally, because of the additional work which is being handled by
the free taskq the number of threads has been increased.  The
thread count under Illumos defaults to 100 but was decreased to 2
in commit 08d08e due to contention.  We increase it to 8 until
the contention can be address by porting Illumos #3581.

Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1354
This commit is contained in:
George Wilson
2013-05-02 16:36:32 -07:00
committed by Brian Behlendorf
parent 5165473737
commit 5853fe790d
7 changed files with 169 additions and 65 deletions
+22 -8
View File
@@ -11,6 +11,7 @@
.\"
.\"
.\" Copyright 2012, Richard Lowe.
.\" Copyright (c) 2012 by Delphix. All rights reserved.
.\"
.TH "ZDB" "8" "February 15, 2012" "" ""
@@ -19,21 +20,23 @@
.SH "SYNOPSIS"
\fBzdb\fR [-CumdibcsDvhLXFPA] [-e [-p \fIpath\fR...]] [-t \fItxg\fR]
\fIpoolname\fR [\fIobject\fR ...]
[-U \fIcache\fR] [-M \fIinflight I/Os\fR] [\fIpoolname\fR
[\fIobject\fR ...]]
.P
\fBzdb\fR [-divPA] [-e [-p \fIpath\fR...]] \fIdataset\fR [\fIobject\fR ...]
\fBzdb\fR [-divPA] [-e [-p \fIpath\fR...]] [-U \fIcache\fR]
\fIdataset\fR [\fIobject\fR ...]
.P
\fBzdb\fR -m [-LXFPA] [-t \fItxg\fR] [-e [-p \fIpath\fR...]] \fIpoolname\fR
[\fIvdev\fR [\fImetaslab\fR ...]]
\fBzdb\fR -m [-LXFPA] [-t \fItxg\fR] [-e [-p \fIpath\fR...]] [-U \fIcache\fR]
\fIpoolname\fR [\fIvdev\fR [\fImetaslab\fR ...]]
.P
\fBzdb\fR -R [-A] [-e [-p \fIpath\fR...]] \fIpoolname\fR
\fBzdb\fR -R [-A] [-e [-p \fIpath\fR...]] [-U \fIcache\fR] \fIpoolname\fR
\fIvdev\fR:\fIoffset\fR:\fIsize\fR[:\fIflags\fR]
.P
\fBzdb\fR -S [-AP] [-e [-p \fIpath\fR...]] \fIpoolname\fR
\fBzdb\fR -S [-AP] [-e [-p \fIpath\fR...]] [-U \fIcache\fR] \fIpoolname\fR
.P
\fBzdb\fR -l [-uA] \fIdevice\fR
@@ -354,6 +357,18 @@ Attempt to make an unreadable pool readable by trying progressively older
transactions.
.RE
.sp
.ne 2
.na
\fB-M \fIinflight I/Os\fR \fR
.ad
.sp .6
.RS 4n
Limit the number of outstanding checksum I/Os to the specified value. The
default value is 200. This option affects the performance of the \fB-c\fR
option.
.RE
.sp
.ne 2
.na
@@ -384,8 +399,7 @@ and their associated transaction numbers.
.ad
.sp .6
.RS 4n
Use a cache file other than \fB/etc/zfs/zpool.cache\fR. This option is only
valid with \fB-C\fR
Use a cache file other than \fB/etc/zfs/zpool.cache\fR.
.RE
.sp
+17 -2
View File
@@ -112,6 +112,11 @@ zpool \- configures ZFS storage pools
\fBzpool reguid\fR \fIpool\fR
.fi
.LP
.nf
\fBzpool reopen\fR \fIpool\fR
.fi
.LP
.nf
\fBzpool remove\fR \fIpool\fR \fIdevice\fR ...
@@ -1508,8 +1513,18 @@ Expand the device to use all available space. If the device is part of a mirror
.ad
.sp .6
.RS 4n
Generates a new unique identifier for the pool. You must ensure that all devices in this pool are online and
healthy before performing this action.
Generates a new unique identifier for the pool. You must ensure that all
devices in this pool are online and healthy before performing this action.
.RE
.sp
.ne 2
.na
\fB\fBzpool reopen\fR \fIpool\fR
.ad
.sp .6
.RS 4n
Reopen all the vdevs associated with the pool.
.RE
.sp