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.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
23 * All rights reserved.
25 * Portions Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>
28 #include <sys/zfs_context.h>
29 #include <sys/param.h>
30 #include <sys/kernel.h>
34 #include <sys/spa_impl.h>
35 #include <sys/vdev_impl.h>
36 #include <sys/fs/zfs.h>
38 #include <geom/geom.h>
39 #include <geom/geom_int.h>
42 * Virtual device vector for GEOM.
45 static g_attrchanged_t vdev_geom_attrchanged;
46 struct g_class zfs_vdev_class = {
49 .attrchanged = vdev_geom_attrchanged,
52 DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev);
54 SYSCTL_DECL(_vfs_zfs_vdev);
55 /* Don't send BIO_FLUSH. */
56 static int vdev_geom_bio_flush_disable;
57 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_flush_disable, CTLFLAG_RWTUN,
58 &vdev_geom_bio_flush_disable, 0, "Disable BIO_FLUSH");
59 /* Don't send BIO_DELETE. */
60 static int vdev_geom_bio_delete_disable;
61 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_delete_disable, CTLFLAG_RWTUN,
62 &vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE");
65 * Thread local storage used to indicate when a thread is probing geoms
66 * for their guids. If NULL, this thread is not tasting geoms. If non NULL,
67 * it is looking for a replacement for the vdev_t* that is its value.
69 uint_t zfs_geom_probe_vdev_key;
72 vdev_geom_set_rotation_rate(vdev_t *vd, struct g_consumer *cp)
77 error = g_getattr("GEOM::rotation_rate", cp, &rate);
79 vd->vdev_rotation_rate = rate;
81 vd->vdev_rotation_rate = VDEV_RATE_UNKNOWN;
85 vdev_geom_attrchanged(struct g_consumer *cp, const char *attr)
90 int error, physpath_len;
96 if (strcmp(attr, "GEOM::rotation_rate") == 0) {
97 vdev_geom_set_rotation_rate(vd, cp);
101 if (strcmp(attr, "GEOM::physpath") != 0)
104 if (g_access(cp, 1, 0, 0) != 0)
108 * Record/Update physical path information for this device.
111 physpath_len = MAXPATHLEN;
112 physpath = g_malloc(physpath_len, M_WAITOK|M_ZERO);
113 error = g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath);
114 g_access(cp, -1, 0, 0);
118 old_physpath = vd->vdev_physpath;
119 vd->vdev_physpath = spa_strdup(physpath);
120 spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE);
122 if (old_physpath != NULL) {
125 held_lock = spa_config_held(spa, SCL_STATE, RW_WRITER);
126 if (held_lock == 0) {
128 spa_config_enter(spa, SCL_STATE, FTAG,
132 spa_strfree(old_physpath);
134 if (held_lock == 0) {
135 spa_config_exit(spa, SCL_STATE, FTAG);
144 vdev_geom_orphan(struct g_consumer *cp)
152 /* Vdev close in progress. Ignore the event. */
157 * Orphan callbacks occur from the GEOM event thread.
158 * Concurrent with this call, new I/O requests may be
159 * working their way through GEOM about to find out
160 * (only once executed by the g_down thread) that we've
161 * been orphaned from our disk provider. These I/Os
162 * must be retired before we can detach our consumer.
163 * This is most easily achieved by acquiring the
164 * SPA ZIO configuration lock as a writer, but doing
165 * so with the GEOM topology lock held would cause
166 * a lock order reversal. Instead, rely on the SPA's
167 * async removal support to invoke a close on this
168 * vdev once it is safe to do so.
170 vd->vdev_remove_wanted = B_TRUE;
171 spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE);
174 static struct g_consumer *
175 vdev_geom_attach(struct g_provider *pp, vdev_t *vd)
178 struct g_consumer *cp;
182 ZFS_LOG(1, "Attaching to %s.", pp->name);
183 /* Do we have geom already? No? Create one. */
184 LIST_FOREACH(gp, &zfs_vdev_class.geom, geom) {
185 if (gp->flags & G_GEOM_WITHER)
187 if (strcmp(gp->name, "zfs::vdev") != 0)
192 gp = g_new_geomf(&zfs_vdev_class, "zfs::vdev");
193 gp->orphan = vdev_geom_orphan;
194 gp->attrchanged = vdev_geom_attrchanged;
195 cp = g_new_consumer(gp);
196 if (g_attach(cp, pp) != 0) {
197 g_wither_geom(gp, ENXIO);
200 if (g_access(cp, 1, 0, 1) != 0) {
201 g_wither_geom(gp, ENXIO);
204 ZFS_LOG(1, "Created geom and consumer for %s.", pp->name);
206 /* Check if we are already connected to this provider. */
207 LIST_FOREACH(cp, &gp->consumer, consumer) {
208 if (cp->provider == pp) {
209 ZFS_LOG(1, "Found consumer for %s.", pp->name);
214 cp = g_new_consumer(gp);
215 if (g_attach(cp, pp) != 0) {
216 g_destroy_consumer(cp);
219 if (g_access(cp, 1, 0, 1) != 0) {
221 g_destroy_consumer(cp);
224 ZFS_LOG(1, "Created consumer for %s.", pp->name);
226 if (g_access(cp, 1, 0, 1) != 0)
228 ZFS_LOG(1, "Used existing consumer for %s.", pp->name);
233 * BUG: cp may already belong to a vdev. This could happen if:
234 * 1) That vdev is a shared spare, or
235 * 2) We are trying to reopen a missing vdev and we are scanning by
236 * guid. In that case, we'll ultimately fail to open this consumer,
237 * but not until after setting the private field.
238 * The solution is to:
239 * 1) Don't set the private field until after the open succeeds, and
240 * 2) Set it to a linked list of vdevs, not just a single vdev
245 /* Fetch initial physical path information for this device. */
246 vdev_geom_attrchanged(cp, "GEOM::physpath");
248 cp->flags |= G_CF_DIRECT_SEND | G_CF_DIRECT_RECEIVE;
253 vdev_geom_close_locked(vdev_t *vd)
256 struct g_consumer *cp;
264 ZFS_LOG(1, "Closing access to %s.", cp->provider->name);
265 KASSERT(vd->vdev_tsd == cp, ("%s: vdev_tsd is not cp", __func__));
267 vd->vdev_delayed_close = B_FALSE;
271 g_access(cp, -1, 0, -1);
272 /* Destroy consumer on last close. */
273 if (cp->acr == 0 && cp->ace == 0) {
275 g_access(cp, 0, -cp->acw, 0);
276 if (cp->provider != NULL) {
277 ZFS_LOG(1, "Destroyed consumer to %s.",
281 g_destroy_consumer(cp);
283 /* Destroy geom if there are no consumers left. */
284 if (LIST_EMPTY(&gp->consumer)) {
285 ZFS_LOG(1, "Destroyed geom %s.", gp->name);
286 g_wither_geom(gp, ENXIO);
291 nvlist_get_guids(nvlist_t *list, uint64_t *pguid, uint64_t *vguid)
294 (void) nvlist_lookup_uint64(list, ZPOOL_CONFIG_GUID, vguid);
295 (void) nvlist_lookup_uint64(list, ZPOOL_CONFIG_POOL_GUID, pguid);
299 vdev_geom_io(struct g_consumer *cp, int cmd, void *data, off_t offset, off_t size)
306 ASSERT((offset % cp->provider->sectorsize) == 0);
307 ASSERT((size % cp->provider->sectorsize) == 0);
313 maxio = MAXPHYS - (MAXPHYS % cp->provider->sectorsize);
316 for (; off < offset; off += maxio, p += maxio, size -= maxio) {
317 bzero(bp, sizeof(*bp));
320 bp->bio_offset = off;
321 bp->bio_length = MIN(size, maxio);
323 g_io_request(bp, cp);
324 error = biowait(bp, "vdev_geom_io");
334 vdev_geom_taste_orphan(struct g_consumer *cp)
336 ZFS_LOG(0, "WARNING: Orphan %s while tasting its VDev GUID.",
341 vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config)
343 struct g_provider *pp;
352 g_topology_assert_not();
355 ZFS_LOG(1, "Reading config from %s...", pp->name);
357 psize = pp->mediasize;
358 psize = P2ALIGN(psize, (uint64_t)sizeof(vdev_label_t));
360 size = sizeof(*label) + pp->sectorsize -
361 ((sizeof(*label) - 1) % pp->sectorsize) - 1;
363 label = kmem_alloc(size, KM_SLEEP);
364 buflen = sizeof(label->vl_vdev_phys.vp_nvlist);
367 for (l = 0; l < VDEV_LABELS; l++) {
369 offset = vdev_label_offset(psize, l, 0);
370 if ((offset % pp->sectorsize) != 0)
373 if (vdev_geom_io(cp, BIO_READ, label, offset, size) != 0)
375 buf = label->vl_vdev_phys.vp_nvlist;
377 if (nvlist_unpack(buf, buflen, config, 0) != 0)
380 if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
381 &state) != 0 || state > POOL_STATE_L2CACHE) {
382 nvlist_free(*config);
387 if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE &&
388 (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG,
389 &txg) != 0 || txg == 0)) {
390 nvlist_free(*config);
398 kmem_free(label, size);
399 return (*config == NULL ? ENOENT : 0);
403 resize_configs(nvlist_t ***configs, uint64_t *count, uint64_t id)
405 nvlist_t **new_configs;
410 new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
412 for (i = 0; i < *count; i++)
413 new_configs[i] = (*configs)[i];
414 if (*configs != NULL)
415 kmem_free(*configs, *count * sizeof(void *));
416 *configs = new_configs;
421 process_vdev_config(nvlist_t ***configs, uint64_t *count, nvlist_t *cfg,
422 const char *name, uint64_t* known_pool_guid)
426 uint64_t vdev_guid, known_guid;
427 uint64_t id, txg, known_txg;
431 if (nvlist_lookup_string(cfg, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 ||
432 strcmp(pname, name) != 0)
435 if (nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_POOL_GUID, &pool_guid) != 0)
438 if (nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_TOP_GUID, &vdev_guid) != 0)
441 if (nvlist_lookup_nvlist(cfg, ZPOOL_CONFIG_VDEV_TREE, &vdev_tree) != 0)
444 if (nvlist_lookup_uint64(vdev_tree, ZPOOL_CONFIG_ID, &id) != 0)
447 VERIFY(nvlist_lookup_uint64(cfg, ZPOOL_CONFIG_POOL_TXG, &txg) == 0);
449 if (*known_pool_guid != 0) {
450 if (pool_guid != *known_pool_guid)
453 *known_pool_guid = pool_guid;
455 resize_configs(configs, count, id);
457 if ((*configs)[id] != NULL) {
458 VERIFY(nvlist_lookup_uint64((*configs)[id],
459 ZPOOL_CONFIG_POOL_TXG, &known_txg) == 0);
460 if (txg <= known_txg)
462 nvlist_free((*configs)[id]);
465 (*configs)[id] = cfg;
473 vdev_geom_attach_taster(struct g_consumer *cp, struct g_provider *pp)
477 if (pp->flags & G_PF_WITHER)
480 error = g_access(cp, 1, 0, 0);
482 if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize))
484 else if (pp->mediasize < SPA_MINDEVSIZE)
487 g_access(cp, -1, 0, 0);
495 vdev_geom_detach_taster(struct g_consumer *cp)
497 g_access(cp, -1, 0, 0);
502 vdev_geom_read_pool_label(const char *name,
503 nvlist_t ***configs, uint64_t *count)
506 struct g_geom *gp, *zgp;
507 struct g_provider *pp;
508 struct g_consumer *zcp;
516 zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste");
517 /* This orphan function should be never called. */
518 zgp->orphan = vdev_geom_taste_orphan;
519 zcp = g_new_consumer(zgp);
524 LIST_FOREACH(mp, &g_classes, class) {
525 if (mp == &zfs_vdev_class)
527 LIST_FOREACH(gp, &mp->geom, geom) {
528 if (gp->flags & G_GEOM_WITHER)
530 LIST_FOREACH(pp, &gp->provider, provider) {
531 if (pp->flags & G_PF_WITHER)
533 if (vdev_geom_attach_taster(zcp, pp) != 0)
536 error = vdev_geom_read_config(zcp, &vdev_cfg);
538 vdev_geom_detach_taster(zcp);
541 ZFS_LOG(1, "successfully read vdev config");
543 process_vdev_config(configs, count,
544 vdev_cfg, name, &pool_guid);
549 g_destroy_consumer(zcp);
554 return (*count > 0 ? 0 : ENOENT);
558 vdev_geom_read_guids(struct g_consumer *cp, uint64_t *pguid, uint64_t *vguid)
562 g_topology_assert_not();
566 if (vdev_geom_read_config(cp, &config) == 0) {
567 nvlist_get_guids(config, pguid, vguid);
572 static struct g_consumer *
573 vdev_geom_attach_by_guids(vdev_t *vd)
576 struct g_geom *gp, *zgp;
577 struct g_provider *pp;
578 struct g_consumer *cp, *zcp;
579 uint64_t pguid, vguid;
583 zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste");
584 zgp->orphan = vdev_geom_taste_orphan;
585 zcp = g_new_consumer(zgp);
588 LIST_FOREACH(mp, &g_classes, class) {
589 if (mp == &zfs_vdev_class)
591 LIST_FOREACH(gp, &mp->geom, geom) {
592 if (gp->flags & G_GEOM_WITHER)
594 LIST_FOREACH(pp, &gp->provider, provider) {
595 if (vdev_geom_attach_taster(zcp, pp) != 0)
598 vdev_geom_read_guids(zcp, &pguid, &vguid);
600 vdev_geom_detach_taster(zcp);
602 * Check that the label's vdev guid matches the
603 * desired guid. If the label has a pool guid,
604 * check that it matches too. (Inactive spares
605 * and L2ARCs do not have any pool guid in the
609 pguid != spa_guid(vd->vdev_spa)) ||
610 vguid != vd->vdev_guid)
612 cp = vdev_geom_attach(pp, vd);
614 printf("ZFS WARNING: Unable to "
615 "attach to %s.\n", pp->name);
627 g_destroy_consumer(zcp);
632 static struct g_consumer *
633 vdev_geom_open_by_guids(vdev_t *vd)
635 struct g_consumer *cp;
641 ZFS_LOG(1, "Searching by guid [%ju].", (uintmax_t)vd->vdev_guid);
642 cp = vdev_geom_attach_by_guids(vd);
644 len = strlen(cp->provider->name) + strlen("/dev/") + 1;
645 buf = kmem_alloc(len, KM_SLEEP);
647 snprintf(buf, len, "/dev/%s", cp->provider->name);
648 spa_strfree(vd->vdev_path);
651 ZFS_LOG(1, "Attach by guid [%ju:%ju] succeeded, provider %s.",
652 (uintmax_t)spa_guid(vd->vdev_spa),
653 (uintmax_t)vd->vdev_guid, vd->vdev_path);
655 ZFS_LOG(1, "Search by guid [%ju:%ju] failed.",
656 (uintmax_t)spa_guid(vd->vdev_spa),
657 (uintmax_t)vd->vdev_guid);
663 static struct g_consumer *
664 vdev_geom_open_by_path(vdev_t *vd, int check_guid)
666 struct g_provider *pp;
667 struct g_consumer *cp;
668 uint64_t pguid, vguid;
673 pp = g_provider_by_name(vd->vdev_path + sizeof("/dev/") - 1);
675 ZFS_LOG(1, "Found provider by name %s.", vd->vdev_path);
676 cp = vdev_geom_attach(pp, vd);
677 if (cp != NULL && check_guid && ISP2(pp->sectorsize) &&
678 pp->sectorsize <= VDEV_PAD_SIZE) {
680 vdev_geom_read_guids(cp, &pguid, &vguid);
682 if (pguid != spa_guid(vd->vdev_spa) ||
683 vguid != vd->vdev_guid) {
684 vdev_geom_close_locked(vd);
686 ZFS_LOG(1, "guid mismatch for provider %s: "
687 "%ju:%ju != %ju:%ju.", vd->vdev_path,
688 (uintmax_t)spa_guid(vd->vdev_spa),
689 (uintmax_t)vd->vdev_guid,
690 (uintmax_t)pguid, (uintmax_t)vguid);
692 ZFS_LOG(1, "guid match for provider %s.",
702 vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
703 uint64_t *logical_ashift, uint64_t *physical_ashift)
705 struct g_provider *pp;
706 struct g_consumer *cp;
710 /* Set the TLS to indicate downstack that we should not access zvols*/
711 VERIFY(tsd_set(zfs_geom_probe_vdev_key, vd) == 0);
714 * We must have a pathname, and it must be absolute.
716 if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') {
717 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
727 if (vd->vdev_spa->spa_splitting_newspa ||
728 (vd->vdev_prevstate == VDEV_STATE_UNKNOWN &&
729 vd->vdev_spa->spa_load_state == SPA_LOAD_NONE)) {
731 * We are dealing with a vdev that hasn't been previously
732 * opened (since boot), and we are not loading an
733 * existing pool configuration. This looks like a
734 * vdev add operation to a new or existing pool.
735 * Assume the user knows what he/she is doing and find
736 * GEOM provider by its name, ignoring GUID mismatches.
738 * XXPOLICY: It would be safer to only allow a device
739 * that is unlabeled or labeled but missing
740 * GUID information to be opened in this fashion,
741 * unless we are doing a split, in which case we
742 * should allow any guid.
744 cp = vdev_geom_open_by_path(vd, 0);
747 * Try using the recorded path for this device, but only
748 * accept it if its label data contains the expected GUIDs.
750 cp = vdev_geom_open_by_path(vd, 1);
753 * The device at vd->vdev_path doesn't have the
754 * expected GUIDs. The disks might have merely
755 * moved around so try all other GEOM providers
756 * to find one with the right GUIDs.
758 cp = vdev_geom_open_by_guids(vd);
762 /* Clear the TLS now that tasting is done */
763 VERIFY(tsd_set(zfs_geom_probe_vdev_key, NULL) == 0);
766 ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
768 } else if (cp->provider->sectorsize > VDEV_PAD_SIZE ||
769 !ISP2(cp->provider->sectorsize)) {
770 ZFS_LOG(1, "Provider %s has unsupported sectorsize.",
773 vdev_geom_close_locked(vd);
776 } else if (cp->acw == 0 && (spa_mode(vd->vdev_spa) & FWRITE) != 0) {
779 for (i = 0; i < 5; i++) {
780 error = g_access(cp, 0, 1, 0);
784 tsleep(vd, 0, "vdev", hz / 2);
788 printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n",
789 vd->vdev_path, error);
790 vdev_geom_close_locked(vd);
798 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
804 * Determine the actual size of the device.
806 *max_psize = *psize = pp->mediasize;
809 * Determine the device's minimum transfer size and preferred
812 *logical_ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
813 *physical_ashift = 0;
815 *physical_ashift = highbit(pp->stripesize) - 1;
818 * Clear the nowritecache settings, so that on a vdev_reopen()
821 vd->vdev_nowritecache = B_FALSE;
824 * Determine the device's rotation rate.
826 vdev_geom_set_rotation_rate(vd, cp);
832 vdev_geom_close(vdev_t *vd)
837 vdev_geom_close_locked(vd);
843 vdev_geom_io_intr(struct bio *bp)
848 zio = bp->bio_caller1;
850 zio->io_error = bp->bio_error;
851 if (zio->io_error == 0 && bp->bio_resid != 0)
852 zio->io_error = SET_ERROR(EIO);
854 switch(zio->io_error) {
857 * If we get ENOTSUP for BIO_FLUSH or BIO_DELETE we know
858 * that future attempts will never succeed. In this case
859 * we set a persistent flag so that we don't bother with
860 * requests in the future.
862 switch(bp->bio_cmd) {
864 vd->vdev_nowritecache = B_TRUE;
867 vd->vdev_notrim = B_TRUE;
872 if (!vd->vdev_remove_wanted) {
874 * If provider's error is set we assume it is being
877 if (bp->bio_to->error != 0) {
878 vd->vdev_remove_wanted = B_TRUE;
879 spa_async_request(zio->io_spa,
881 } else if (!vd->vdev_delayed_close) {
882 vd->vdev_delayed_close = B_TRUE;
892 vdev_geom_io_start(zio_t *zio)
895 struct g_consumer *cp;
901 switch (zio->io_type) {
904 if (!vdev_readable(vd)) {
905 zio->io_error = SET_ERROR(ENXIO);
909 switch (zio->io_cmd) {
910 case DKIOCFLUSHWRITECACHE:
911 if (zfs_nocacheflush || vdev_geom_bio_flush_disable)
913 if (vd->vdev_nowritecache) {
914 zio->io_error = SET_ERROR(ENOTSUP);
919 zio->io_error = SET_ERROR(ENOTSUP);
926 if (vd->vdev_notrim) {
927 zio->io_error = SET_ERROR(ENOTSUP);
928 } else if (!vdev_geom_bio_delete_disable) {
935 ASSERT(zio->io_type == ZIO_TYPE_READ ||
936 zio->io_type == ZIO_TYPE_WRITE ||
937 zio->io_type == ZIO_TYPE_FREE ||
938 zio->io_type == ZIO_TYPE_IOCTL);
942 zio->io_error = SET_ERROR(ENXIO);
947 bp->bio_caller1 = zio;
948 switch (zio->io_type) {
951 bp->bio_cmd = zio->io_type == ZIO_TYPE_READ ? BIO_READ : BIO_WRITE;
952 bp->bio_data = zio->io_data;
953 bp->bio_offset = zio->io_offset;
954 bp->bio_length = zio->io_size;
957 bp->bio_cmd = BIO_DELETE;
959 bp->bio_offset = zio->io_offset;
960 bp->bio_length = zio->io_size;
963 bp->bio_cmd = BIO_FLUSH;
964 bp->bio_flags |= BIO_ORDERED;
966 bp->bio_offset = cp->provider->mediasize;
970 bp->bio_done = vdev_geom_io_intr;
972 g_io_request(bp, cp);
976 vdev_geom_io_done(zio_t *zio)
981 vdev_geom_hold(vdev_t *vd)
986 vdev_geom_rele(vdev_t *vd)
990 vdev_ops_t vdev_geom_ops = {
999 VDEV_TYPE_DISK, /* name of this vdev type */
1000 B_TRUE /* leaf vdev */