summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-10-11 14:24:18 -0700
committerBrian Behlendorf <[email protected]>2013-10-22 10:25:51 -0700
commit11cb9d773f48830cf3ff718861c070a8937c6a03 (patch)
treeee708094741cf8959364d63262655d02f18f97ae /lib
parentb3c49d3df82466646bde9beebce7bbf0b3c41853 (diff)
Increase default udev wait time
When creating a new pool, or adding/replacing a disk in an existing pool, partition tables will be automatically created on the devices. Under normal circumstances it will take less than a second for udev to create the expected device files under /dev/. However, it has been observed that if the system is doing heavy IO concurrently udev may take far longer. If you also throw in some cheap dodgy hardware it may take even longer. To prevent zpool commands from failing due to this the default wait time for udev is being increased to 30 seconds. This will have no impact on normal usage, the increase timeout should only be noticed if your udev rules are incorrectly configured. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1646
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_dataset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index e43c7c6bd..e2808638e 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -4080,10 +4080,10 @@ zvol_create_link_common(libzfs_handle_t *hdl, const char *dataset, int ifexists)
}
/*
- * Wait up to 10 seconds for udev to create the device.
+ * Wait for udev to create the device.
*/
(void) snprintf(path, sizeof (path), "%s/%s", ZVOL_DIR, dataset);
- error = zpool_label_disk_wait(path, 10000);
+ error = zpool_label_disk_wait(path, DISK_LABEL_WAIT);
if (error)
(void) printf(gettext("%s may not be immediately "
"available\n"), path);