Mercurial > illumos > illumos-gate
annotate usr/src/uts/intel/zfs/spa_boot.c @ 13869:921a99998bb4
3246 ZFS I/O deadman thread
Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com>
Reviewed by: Eric Schrock <eric.schrock@delphix.com>
Reviewed by: Christopher Siden <chris.siden@delphix.com>
Approved by: Garrett D'Amore <garrett@damore.org>
author | George.Wilson <george.wilson@delphix.com> |
---|---|
date | Mon, 29 Oct 2012 12:08:09 -0500 |
parents | e2081f502306 |
children |
rev | line source |
---|---|
6423 | 1 /* |
2 * CDDL HEADER START | |
3 * | |
4 * The contents of this file are subject to the terms of the | |
5 * Common Development and Distribution License (the "License"). | |
6 * You may not use this file except in compliance with the License. | |
7 * | |
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
9 * or http://www.opensolaris.org/os/licensing. | |
10 * See the License for the specific language governing permissions | |
11 * and limitations under the License. | |
12 * | |
13 * When distributing Covered Code, include this CDDL HEADER in each | |
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. | |
15 * If applicable, add the following below this CDDL HEADER, with the | |
16 * fields enclosed by brackets "[]" replaced with your own identifying | |
17 * information: Portions Copyright [yyyy] [name of copyright owner] | |
18 * | |
19 * CDDL HEADER END | |
20 */ | |
21 | |
22 /* | |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7147
diff
changeset
|
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
6423 | 24 * Use is subject to license terms. |
25 */ | |
26 | |
13869
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
27 /* |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
28 * Copyright (c) 2012 by Delphix. All rights reserved. |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
29 */ |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
30 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7147
diff
changeset
|
31 #include <sys/zio.h> |
6423 | 32 #include <sys/spa.h> |
33 #include <sys/sunddi.h> | |
13869
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
34 #include <sys/x86_archext.h> |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
35 |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
36 extern int zfs_deadman_enabled; |
6423 | 37 |
38 char * | |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
39 spa_get_bootprop(char *propname) |
6423 | 40 { |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
41 char *value; |
6423 | 42 |
43 if (ddi_prop_lookup_string(DDI_DEV_T_ANY, ddi_root_node(), | |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
44 DDI_PROP_DONTPASS, propname, &value) != DDI_SUCCESS) |
6423 | 45 return (NULL); |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
46 return (value); |
6423 | 47 } |
48 | |
49 void | |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
50 spa_free_bootprop(char *value) |
6423 | 51 { |
7147
1e1d75c88283
6704717 ZFS mirrored root doesn't live up to expectations
taylor
parents:
6423
diff
changeset
|
52 ddi_prop_free(value); |
6423 | 53 } |
13869
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
54 |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
55 void |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
56 spa_arch_init(void) |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
57 { |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
58 /* |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
59 * Configure the default settings for the zfs deadman unless |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
60 * overriden by /etc/system. |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
61 */ |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
62 if (zfs_deadman_enabled == -1) { |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
63 /* |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
64 * Disable the zfs deadman logic on VMware deployments. |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
65 */ |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
66 if (get_hwenv() == HW_VMWARE) |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
67 zfs_deadman_enabled = 0; |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
68 else |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
69 zfs_deadman_enabled = 1; |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
70 } |
921a99998bb4
3246 ZFS I/O deadman thread
George.Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
71 } |