summaryrefslogtreecommitdiffstats
path: root/module/zfs/spa.c
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2016-07-08 10:33:01 -0500
committerBrian Behlendorf <[email protected]>2016-07-25 14:24:47 -0700
commite6603b7c1fc7ac01f8891b11df34d943812153e9 (patch)
tree9fede819ea53702b3be37ee0a5600c7c862915be /module/zfs/spa.c
parent273ff9b5ccc438e3099809c43229cc75503cff68 (diff)
Fix sync behavior for disk vdevs
Prior to b39c22b, which was first generally available in the 0.6.5 release as b39c22b, ZoL never actually submitted synchronous read or write requests to the Linux block layer. This means the vdev_disk_dio_is_sync() function had always returned false and, therefore, the completion in dio_request_t.dr_comp was never actually used. In b39c22b, synchronous ZIO operations were translated to synchronous BIO requests in vdev_disk_io_start(). The follow-on commits 5592404 and aa159af fixed several problems introduced by b39c22b. In particular, 5592404 introduced the new flag parameter "wait" to __vdev_disk_physio() but under ZoL, since vdev_disk_physio() is never actually used, the wait flag was always zero so the new code had no effect other than to cause a bug in the use of the dio_request_t.dr_comp which was fixed by aa159af. The original rationale for introducing synchronous operations in b39c22b was to hurry certains requests through the BIO layer which would have otherwise been subject to its unplug timer which would increase the latency. This behavior of the unplug timer, however, went away during the transition of the plug/unplug system between kernels 2.6.32 and 2.6.39. To handle the unplug timer behavior on 2.6.32-2.6.35 kernels the BIO_RW_UNPLUG flag is used as a hint to suppress the plugging behavior. For kernels 2.6.36-2.6.38, the REQ_UNPLUG macro will be available and ise used for the same purpose. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4858
Diffstat (limited to 'module/zfs/spa.c')
-rw-r--r--module/zfs/spa.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 26181af84..15c87866e 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -3971,7 +3971,7 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
return (0);
}
-#ifdef _KERNEL
+#if defined(_KERNEL) && !defined(__linux__)
/*
* Get the root pool information from the root disk, then import the root pool
* during the system boot up time.
@@ -4174,7 +4174,7 @@ out:
return (error);
}
-#endif
+#endif /* defined(_KERNEL) && !defined(__linux__) */
/*
* Import a non-root pool into the system.
@@ -7038,7 +7038,6 @@ EXPORT_SYMBOL(spa_open);
EXPORT_SYMBOL(spa_open_rewind);
EXPORT_SYMBOL(spa_get_stats);
EXPORT_SYMBOL(spa_create);
-EXPORT_SYMBOL(spa_import_rootpool);
EXPORT_SYMBOL(spa_import);
EXPORT_SYMBOL(spa_tryimport);
EXPORT_SYMBOL(spa_destroy);