spa_misc.c (268649) | spa_misc.c (268650) |
---|---|
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 --- 241 unchanged lines hidden (view full) --- 250 251/* 252 * zfs_recover can be set to nonzero to attempt to recover from 253 * otherwise-fatal errors, typically caused by on-disk corruption. When 254 * set, calls to zfs_panic_recover() will turn into warning messages. 255 * This should only be used as a last resort, as it typically results 256 * in leaked space, or worse. 257 */ | 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 --- 241 unchanged lines hidden (view full) --- 250 251/* 252 * zfs_recover can be set to nonzero to attempt to recover from 253 * otherwise-fatal errors, typically caused by on-disk corruption. When 254 * set, calls to zfs_panic_recover() will turn into warning messages. 255 * This should only be used as a last resort, as it typically results 256 * in leaked space, or worse. 257 */ |
258int zfs_recover = 0; | 258boolean_t zfs_recover = B_FALSE; |
259SYSCTL_DECL(_vfs_zfs); 260TUNABLE_INT("vfs.zfs.recover", &zfs_recover); 261SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, &zfs_recover, 0, 262 "Try to recover from otherwise-fatal errors."); 263 264/* | 259SYSCTL_DECL(_vfs_zfs); 260TUNABLE_INT("vfs.zfs.recover", &zfs_recover); 261SYSCTL_INT(_vfs_zfs, OID_AUTO, recover, CTLFLAG_RDTUN, &zfs_recover, 0, 262 "Try to recover from otherwise-fatal errors."); 263 264/* |
265 * If destroy encounters an EIO while reading metadata (e.g. indirect 266 * blocks), space referenced by the missing metadata can not be freed. 267 * Normally this causes the background destroy to become "stalled", as 268 * it is unable to make forward progress. While in this stalled state, 269 * all remaining space to free from the error-encountering filesystem is 270 * "temporarily leaked". Set this flag to cause it to ignore the EIO, 271 * permanently leak the space from indirect blocks that can not be read, 272 * and continue to free everything else that it can. 273 * 274 * The default, "stalling" behavior is useful if the storage partially 275 * fails (i.e. some but not all i/os fail), and then later recovers. In 276 * this case, we will be able to continue pool operations while it is 277 * partially failed, and when it recovers, we can continue to free the 278 * space, with no leaks. However, note that this case is actually 279 * fairly rare. 280 * 281 * Typically pools either (a) fail completely (but perhaps temporarily, 282 * e.g. a top-level vdev going offline), or (b) have localized, 283 * permanent errors (e.g. disk returns the wrong data due to bit flip or 284 * firmware bug). In case (a), this setting does not matter because the 285 * pool will be suspended and the sync thread will not be able to make 286 * forward progress regardless. In case (b), because the error is 287 * permanent, the best we can do is leak the minimum amount of space, 288 * which is what setting this flag will do. Therefore, it is reasonable 289 * for this flag to normally be set, but we chose the more conservative 290 * approach of not setting it, so that there is no possibility of 291 * leaking space in the "partial temporary" failure case. 292 */ 293boolean_t zfs_free_leak_on_eio = B_FALSE; 294 295/* |
|
265 * Expiration time in milliseconds. This value has two meanings. First it is 266 * used to determine when the spa_deadman() logic should fire. By default the 267 * spa_deadman() will fire if spa_sync() has not completed in 1000 seconds. 268 * Secondly, the value determines if an I/O is considered "hung". Any I/O that 269 * has not completed in zfs_deadman_synctime_ms is considered "hung" resulting 270 * in a system panic. 271 */ 272uint64_t zfs_deadman_synctime_ms = 1000000ULL; --- 1676 unchanged lines hidden --- | 296 * Expiration time in milliseconds. This value has two meanings. First it is 297 * used to determine when the spa_deadman() logic should fire. By default the 298 * spa_deadman() will fire if spa_sync() has not completed in 1000 seconds. 299 * Secondly, the value determines if an I/O is considered "hung". Any I/O that 300 * has not completed in zfs_deadman_synctime_ms is considered "hung" resulting 301 * in a system panic. 302 */ 303uint64_t zfs_deadman_synctime_ms = 1000000ULL; --- 1676 unchanged lines hidden --- |