]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/vdev_missing.c
OpenZFS 9102 - zfs should be able to initialize storage devices
[mirror_zfs.git] / module / zfs / vdev_missing.c
index 6a5588d59213785eb91e6867bc349febaa9fdf98..d85993bff05246c241e46558fa33f0c4e0760071 100644 (file)
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2012, 2016 by Delphix. All rights reserved.
+ */
+
 /*
  * The 'missing' vdev is a special vdev type used only during import.  It
  * signifies a placeholder in the root vdev for some vdev that we know is
@@ -40,7 +44,8 @@
 
 /* ARGSUSED */
 static int
-vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift)
+vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
+    uint64_t *ashift)
 {
        /*
         * Really this should just fail.  But then the root vdev will be in the
@@ -49,6 +54,7 @@ vdev_missing_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift)
         * will fail the GUID sum check before ever trying to open the pool.
         */
        *psize = 0;
+       *max_psize = 0;
        *ashift = 0;
        return (0);
 }
@@ -60,11 +66,11 @@ vdev_missing_close(vdev_t *vd)
 }
 
 /* ARGSUSED */
-static int
+static void
 vdev_missing_io_start(zio_t *zio)
 {
-       zio->io_error = ENOTSUP;
-       return (ZIO_PIPELINE_CONTINUE);
+       zio->io_error = SET_ERROR(ENOTSUP);
+       zio_execute(zio);
 }
 
 /* ARGSUSED */
@@ -82,6 +88,9 @@ vdev_ops_t vdev_missing_ops = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       NULL,
+       NULL,
        VDEV_TYPE_MISSING,      /* name of this vdev type */
        B_TRUE                  /* leaf vdev */
 };
@@ -95,6 +104,9 @@ vdev_ops_t vdev_hole_ops = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       NULL,
+       NULL,
        VDEV_TYPE_HOLE,         /* name of this vdev type */
        B_TRUE                  /* leaf vdev */
 };