Created
December 10, 2019 14:41
-
-
Save danmcd/acfc0ee8aa2097f2e26f4a020bd64c0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /Users/danmcd/nfslinks/nowhere/ws/illumos-gate//usr/src/uts/common/fs/zfs/vdev_disk.c 2019-12-05 19:56:39.000000000 -0500 | |
+++ ../zfs/vdev_disk.c 2019-10-01 11:18:10.000000000 -0400 | |
@@ -26,6 +26,7 @@ | |
*/ | |
#include <sys/zfs_context.h> | |
+#include <sys/zfs_zone.h> | |
#include <sys/spa_impl.h> | |
#include <sys/refcount.h> | |
#include <sys/vdev_disk.h> | |
@@ -58,6 +59,11 @@ | |
static void vdev_disk_close(vdev_t *); | |
+typedef struct vdev_disk_buf { | |
+ buf_t vdb_buf; | |
+ zio_t *vdb_io; | |
+} vdev_disk_buf_t; | |
+ | |
typedef struct vdev_disk_ldi_cb { | |
list_node_t lcb_next; | |
ldi_callback_id_t lcb_id; | |
@@ -156,6 +162,8 @@ | |
int ldi_result, void *arg, void *ev_data) | |
{ | |
vdev_t *vd = (vdev_t *)arg; | |
+ vdev_disk_t *dvd = vd->vdev_tsd; | |
+ vdev_disk_ldi_cb_t *lcb; | |
/* | |
* Ignore events other than offline. | |
@@ -735,6 +743,7 @@ | |
vdev_disk_close(vdev_t *vd) | |
{ | |
vdev_disk_t *dvd = vd->vdev_tsd; | |
+ vdev_disk_ldi_cb_t *lcb; | |
if (vd->vdev_reopening || dvd == NULL) | |
return; | |
@@ -1002,6 +1011,8 @@ | |
bp->b_bufsize = zio->io_size; | |
bp->b_iodone = vdev_disk_io_intr; | |
+ zfs_zone_zio_start(zio); | |
+ | |
/* | |
* In general we would expect ldi_strategy() to return non-zero only | |
* because of programming errors, but we've also seen this fail shortly | |
@@ -1018,6 +1029,8 @@ | |
{ | |
vdev_t *vd = zio->io_vd; | |
+ zfs_zone_zio_done(zio); | |
+ | |
/* | |
* If the device returned EIO, then attempt a DKIOCSTATE ioctl to see if | |
* the device has been removed. If this is the case, then we trigger an |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment