aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/zinject
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2010-09-27 09:42:31 +0000
committerMartin Matuska <mm@FreeBSD.org>2010-09-27 09:42:31 +0000
commitaa007a9f0ec532a80213bd2317f97e8fd594d287 (patch)
treecd91e345f4a206c0d89bd52cbf33237f67e560a6 /cddl/contrib/opensolaris/cmd/zinject
parent96a1a6a568567b74866adb91c87c773335003af3 (diff)
downloadsrc-aa007a9f0ec532a80213bd2317f97e8fd594d287.tar.gz
src-aa007a9f0ec532a80213bd2317f97e8fd594d287.zip
Properly handle IO with B_FAILFAST
Retry IO once with ZIO_FLAG_TRYHARD before declaring a pool faulted OpenSolaris revision and Bug IDs: 9725:0bf7402e8022 6843014 ZFS B_FAILFAST handling is broken Approved by: delphij (mentor) Obtained from: OpenSolaris (Bug ID 6843014) MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=213198
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/zinject')
-rw-r--r--cddl/contrib/opensolaris/cmd/zinject/zinject.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zinject/zinject.c b/cddl/contrib/opensolaris/cmd/zinject/zinject.c
index cd48b685c6f3..e8327e8dcdf5 100644
--- a/cddl/contrib/opensolaris/cmd/zinject/zinject.c
+++ b/cddl/contrib/opensolaris/cmd/zinject/zinject.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* ZFS Fault Injector
*
@@ -227,7 +225,7 @@ usage(void)
"\t\tClear the particular record (if given a numeric ID), or\n"
"\t\tall records if 'all' is specificed.\n"
"\n"
- "\tzinject -d device [-e errno] [-L <nvlist|uber>] pool\n"
+ "\tzinject -d device [-e errno] [-L <nvlist|uber>] [-F] pool\n"
"\t\tInject a fault into a particular device or the device's\n"
"\t\tlabel. Label injection can either be 'nvlist' or 'uber'.\n"
"\t\t'errno' can either be 'nxio' (the default) or 'io'.\n"
@@ -519,7 +517,7 @@ main(int argc, char **argv)
return (0);
}
- while ((c = getopt(argc, argv, ":ab:d:f:qhc:t:l:mr:e:uL:")) != -1) {
+ while ((c = getopt(argc, argv, ":ab:d:f:Fqhc:t:l:mr:e:uL:")) != -1) {
switch (c) {
case 'a':
flags |= ZINJECT_FLUSH_ARC;
@@ -556,6 +554,9 @@ main(int argc, char **argv)
return (1);
}
break;
+ case 'F':
+ record.zi_failfast = B_TRUE;
+ break;
case 'h':
usage();
return (0);