]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
MFV: tcpdump 4.3.0.
[FreeBSD/FreeBSD.git] / sys / cddl / contrib / opensolaris / uts / common / fs / zfs / vdev_geom.c
1 /*
2  * CDDL HEADER START
3  *
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.
7  *
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.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
23  * All rights reserved.
24  *
25  * Portions Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>
26  */
27
28 #include <sys/zfs_context.h>
29 #include <sys/param.h>
30 #include <sys/kernel.h>
31 #include <sys/bio.h>
32 #include <sys/disk.h>
33 #include <sys/spa.h>
34 #include <sys/spa_impl.h>
35 #include <sys/vdev_impl.h>
36 #include <sys/fs/zfs.h>
37 #include <sys/zio.h>
38 #include <geom/geom.h>
39 #include <geom/geom_int.h>
40
41 /*
42  * Virtual device vector for GEOM.
43  */
44
45 struct g_class zfs_vdev_class = {
46         .name = "ZFS::VDEV",
47         .version = G_VERSION,
48 };
49
50 DECLARE_GEOM_CLASS(zfs_vdev_class, zfs_vdev);
51
52 SYSCTL_DECL(_vfs_zfs_vdev);
53 /* Don't send BIO_FLUSH. */
54 static int vdev_geom_bio_flush_disable = 0;
55 TUNABLE_INT("vfs.zfs.vdev.bio_flush_disable", &vdev_geom_bio_flush_disable);
56 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_flush_disable, CTLFLAG_RW,
57     &vdev_geom_bio_flush_disable, 0, "Disable BIO_FLUSH");
58 /* Don't send BIO_DELETE. */
59 static int vdev_geom_bio_delete_disable = 0;
60 TUNABLE_INT("vfs.zfs.vdev.bio_delete_disable", &vdev_geom_bio_delete_disable);
61 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, bio_delete_disable, CTLFLAG_RW,
62     &vdev_geom_bio_delete_disable, 0, "Disable BIO_DELETE");
63
64 static void
65 vdev_geom_orphan(struct g_consumer *cp)
66 {
67         vdev_t *vd;
68
69         g_topology_assert();
70
71         vd = cp->private;
72
73         /*
74          * Orphan callbacks occur from the GEOM event thread.
75          * Concurrent with this call, new I/O requests may be
76          * working their way through GEOM about to find out
77          * (only once executed by the g_down thread) that we've
78          * been orphaned from our disk provider.  These I/Os
79          * must be retired before we can detach our consumer.
80          * This is most easily achieved by acquiring the
81          * SPA ZIO configuration lock as a writer, but doing
82          * so with the GEOM topology lock held would cause
83          * a lock order reversal.  Instead, rely on the SPA's
84          * async removal support to invoke a close on this
85          * vdev once it is safe to do so.
86          */
87         zfs_post_remove(vd->vdev_spa, vd);
88         vd->vdev_remove_wanted = B_TRUE;
89         spa_async_request(vd->vdev_spa, SPA_ASYNC_REMOVE);
90 }
91
92 static struct g_consumer *
93 vdev_geom_attach(struct g_provider *pp)
94 {
95         struct g_geom *gp;
96         struct g_consumer *cp;
97
98         g_topology_assert();
99
100         ZFS_LOG(1, "Attaching to %s.", pp->name);
101         /* Do we have geom already? No? Create one. */
102         LIST_FOREACH(gp, &zfs_vdev_class.geom, geom) {
103                 if (gp->flags & G_GEOM_WITHER)
104                         continue;
105                 if (strcmp(gp->name, "zfs::vdev") != 0)
106                         continue;
107                 break;
108         }
109         if (gp == NULL) {
110                 gp = g_new_geomf(&zfs_vdev_class, "zfs::vdev");
111                 gp->orphan = vdev_geom_orphan;
112                 cp = g_new_consumer(gp);
113                 if (g_attach(cp, pp) != 0) {
114                         g_wither_geom(gp, ENXIO);
115                         return (NULL);
116                 }
117                 if (g_access(cp, 1, 0, 1) != 0) {
118                         g_wither_geom(gp, ENXIO);
119                         return (NULL);
120                 }
121                 ZFS_LOG(1, "Created geom and consumer for %s.", pp->name);
122         } else {
123                 /* Check if we are already connected to this provider. */
124                 LIST_FOREACH(cp, &gp->consumer, consumer) {
125                         if (cp->provider == pp) {
126                                 ZFS_LOG(1, "Found consumer for %s.", pp->name);
127                                 break;
128                         }
129                 }
130                 if (cp == NULL) {
131                         cp = g_new_consumer(gp);
132                         if (g_attach(cp, pp) != 0) {
133                                 g_destroy_consumer(cp);
134                                 return (NULL);
135                         }
136                         if (g_access(cp, 1, 0, 1) != 0) {
137                                 g_detach(cp);
138                                 g_destroy_consumer(cp);
139                                 return (NULL);
140                         }
141                         ZFS_LOG(1, "Created consumer for %s.", pp->name);
142                 } else {
143                         if (g_access(cp, 1, 0, 1) != 0)
144                                 return (NULL);
145                         ZFS_LOG(1, "Used existing consumer for %s.", pp->name);
146                 }
147         }
148         return (cp);
149 }
150
151 static void
152 vdev_geom_detach(void *arg, int flag __unused)
153 {
154         struct g_geom *gp;
155         struct g_consumer *cp;
156
157         g_topology_assert();
158         cp = arg;
159         gp = cp->geom;
160
161         ZFS_LOG(1, "Closing access to %s.", cp->provider->name);
162         g_access(cp, -1, 0, -1);
163         /* Destroy consumer on last close. */
164         if (cp->acr == 0 && cp->ace == 0) {
165                 ZFS_LOG(1, "Destroyed consumer to %s.", cp->provider->name);
166                 if (cp->acw > 0)
167                         g_access(cp, 0, -cp->acw, 0);
168                 g_detach(cp);
169                 g_destroy_consumer(cp);
170         }
171         /* Destroy geom if there are no consumers left. */
172         if (LIST_EMPTY(&gp->consumer)) {
173                 ZFS_LOG(1, "Destroyed geom %s.", gp->name);
174                 g_wither_geom(gp, ENXIO);
175         }
176 }
177
178 static uint64_t
179 nvlist_get_guid(nvlist_t *list)
180 {
181         nvpair_t *elem = NULL;
182         uint64_t value;
183
184         while ((elem = nvlist_next_nvpair(list, elem)) != NULL) {
185                 if (nvpair_type(elem) == DATA_TYPE_UINT64 &&
186                     strcmp(nvpair_name(elem), "guid") == 0) {
187                         VERIFY(nvpair_value_uint64(elem, &value) == 0);
188                         return (value);
189                 }
190         }
191         return (0);
192 }
193
194 static int
195 vdev_geom_io(struct g_consumer *cp, int cmd, void *data, off_t offset, off_t size)
196 {
197         struct bio *bp;
198         u_char *p;
199         off_t off, maxio;
200         int error;
201
202         ASSERT((offset % cp->provider->sectorsize) == 0);
203         ASSERT((size % cp->provider->sectorsize) == 0);
204
205         bp = g_alloc_bio();
206         off = offset;
207         offset += size;
208         p = data;
209         maxio = MAXPHYS - (MAXPHYS % cp->provider->sectorsize);
210         error = 0;
211
212         for (; off < offset; off += maxio, p += maxio, size -= maxio) {
213                 bzero(bp, sizeof(*bp));
214                 bp->bio_cmd = cmd;
215                 bp->bio_done = NULL;
216                 bp->bio_offset = off;
217                 bp->bio_length = MIN(size, maxio);
218                 bp->bio_data = p;
219                 g_io_request(bp, cp);
220                 error = biowait(bp, "vdev_geom_io");
221                 if (error != 0)
222                         break;
223         }
224
225         g_destroy_bio(bp);
226         return (error);
227 }
228
229 static uint64_t
230 vdev_geom_read_guid(struct g_consumer *cp)
231 {
232         struct g_provider *pp;
233         vdev_label_t *label;
234         char *p, *buf;
235         size_t buflen;
236         uint64_t psize;
237         off_t offset, size;
238         uint64_t guid;
239         int error, l, len;
240
241         g_topology_assert_not();
242
243         pp = cp->provider;
244         ZFS_LOG(1, "Reading guid from %s...", pp->name);
245
246         psize = pp->mediasize;
247         psize = P2ALIGN(psize, (uint64_t)sizeof(vdev_label_t));
248
249         size = sizeof(*label) + pp->sectorsize -
250             ((sizeof(*label) - 1) % pp->sectorsize) - 1;
251
252         guid = 0;
253         label = kmem_alloc(size, KM_SLEEP);
254         buflen = sizeof(label->vl_vdev_phys.vp_nvlist);
255
256         for (l = 0; l < VDEV_LABELS; l++) {
257                 nvlist_t *config = NULL;
258
259                 offset = vdev_label_offset(psize, l, 0);
260                 if ((offset % pp->sectorsize) != 0)
261                         continue;
262
263                 if (vdev_geom_io(cp, BIO_READ, label, offset, size) != 0)
264                         continue;
265                 buf = label->vl_vdev_phys.vp_nvlist;
266
267                 if (nvlist_unpack(buf, buflen, &config, 0) != 0)
268                         continue;
269
270                 guid = nvlist_get_guid(config);
271                 nvlist_free(config);
272                 if (guid != 0)
273                         break;
274         }
275
276         kmem_free(label, size);
277         if (guid != 0)
278                 ZFS_LOG(1, "guid for %s is %ju", pp->name, (uintmax_t)guid);
279         return (guid);
280 }
281
282 static void
283 vdev_geom_taste_orphan(struct g_consumer *cp)
284 {
285
286         KASSERT(1 == 0, ("%s called while tasting %s.", __func__,
287             cp->provider->name));
288 }
289
290 static struct g_consumer *
291 vdev_geom_attach_by_guid(uint64_t guid)
292 {
293         struct g_class *mp;
294         struct g_geom *gp, *zgp;
295         struct g_provider *pp;
296         struct g_consumer *cp, *zcp;
297         uint64_t pguid;
298
299         g_topology_assert();
300
301         zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste");
302         /* This orphan function should be never called. */
303         zgp->orphan = vdev_geom_taste_orphan;
304         zcp = g_new_consumer(zgp);
305
306         cp = NULL;
307         LIST_FOREACH(mp, &g_classes, class) {
308                 if (mp == &zfs_vdev_class)
309                         continue;
310                 LIST_FOREACH(gp, &mp->geom, geom) {
311                         if (gp->flags & G_GEOM_WITHER)
312                                 continue;
313                         LIST_FOREACH(pp, &gp->provider, provider) {
314                                 if (pp->flags & G_PF_WITHER)
315                                         continue;
316                                 g_attach(zcp, pp);
317                                 if (g_access(zcp, 1, 0, 0) != 0) {
318                                         g_detach(zcp);
319                                         continue;
320                                 }
321                                 g_topology_unlock();
322                                 pguid = vdev_geom_read_guid(zcp);
323                                 g_topology_lock();
324                                 g_access(zcp, -1, 0, 0);
325                                 g_detach(zcp);
326                                 if (pguid != guid)
327                                         continue;
328                                 cp = vdev_geom_attach(pp);
329                                 if (cp == NULL) {
330                                         printf("ZFS WARNING: Unable to attach to %s.\n",
331                                             pp->name);
332                                         continue;
333                                 }
334                                 break;
335                         }
336                         if (cp != NULL)
337                                 break;
338                 }
339                 if (cp != NULL)
340                         break;
341         }
342 end:
343         g_destroy_consumer(zcp);
344         g_destroy_geom(zgp);
345         return (cp);
346 }
347
348 static struct g_consumer *
349 vdev_geom_open_by_guid(vdev_t *vd)
350 {
351         struct g_consumer *cp;
352         char *buf;
353         size_t len;
354
355         g_topology_assert();
356
357         ZFS_LOG(1, "Searching by guid [%ju].", (uintmax_t)vd->vdev_guid);
358         cp = vdev_geom_attach_by_guid(vd->vdev_guid);
359         if (cp != NULL) {
360                 len = strlen(cp->provider->name) + strlen("/dev/") + 1;
361                 buf = kmem_alloc(len, KM_SLEEP);
362
363                 snprintf(buf, len, "/dev/%s", cp->provider->name);
364                 spa_strfree(vd->vdev_path);
365                 vd->vdev_path = buf;
366
367                 ZFS_LOG(1, "Attach by guid [%ju] succeeded, provider %s.",
368                     (uintmax_t)vd->vdev_guid, vd->vdev_path);
369         } else {
370                 ZFS_LOG(1, "Search by guid [%ju] failed.",
371                     (uintmax_t)vd->vdev_guid);
372         }
373
374         return (cp);
375 }
376
377 static struct g_consumer *
378 vdev_geom_open_by_path(vdev_t *vd, int check_guid)
379 {
380         struct g_provider *pp;
381         struct g_consumer *cp;
382         uint64_t guid;
383
384         g_topology_assert();
385
386         cp = NULL;
387         pp = g_provider_by_name(vd->vdev_path + sizeof("/dev/") - 1);
388         if (pp != NULL) {
389                 ZFS_LOG(1, "Found provider by name %s.", vd->vdev_path);
390                 cp = vdev_geom_attach(pp);
391                 if (cp != NULL && check_guid && ISP2(pp->sectorsize) &&
392                     pp->sectorsize <= VDEV_PAD_SIZE) {
393                         g_topology_unlock();
394                         guid = vdev_geom_read_guid(cp);
395                         g_topology_lock();
396                         if (guid != vd->vdev_guid) {
397                                 vdev_geom_detach(cp, 0);
398                                 cp = NULL;
399                                 ZFS_LOG(1, "guid mismatch for provider %s: "
400                                     "%ju != %ju.", vd->vdev_path,
401                                     (uintmax_t)vd->vdev_guid, (uintmax_t)guid);
402                         } else {
403                                 ZFS_LOG(1, "guid match for provider %s.",
404                                     vd->vdev_path);
405                         }
406                 }
407         }
408
409         return (cp);
410 }
411
412 static int
413 vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
414     uint64_t *ashift)
415 {
416         struct g_provider *pp;
417         struct g_consumer *cp;
418         size_t bufsize;
419         int error;
420
421         /*
422          * We must have a pathname, and it must be absolute.
423          */
424         if (vd->vdev_path == NULL || vd->vdev_path[0] != '/') {
425                 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
426                 return (EINVAL);
427         }
428
429         vd->vdev_tsd = NULL;
430
431         DROP_GIANT();
432         g_topology_lock();
433         error = 0;
434
435         /*
436          * If we're creating or splitting a pool, just find the GEOM provider
437          * by its name and ignore GUID mismatches.
438          */
439         if (vd->vdev_spa->spa_load_state == SPA_LOAD_NONE ||
440             vd->vdev_spa->spa_splitting_newspa == B_TRUE)
441                 cp = vdev_geom_open_by_path(vd, 0);
442         else {
443                 cp = vdev_geom_open_by_path(vd, 1);
444                 if (cp == NULL) {
445                         /*
446                          * The device at vd->vdev_path doesn't have the
447                          * expected guid. The disks might have merely
448                          * moved around so try all other GEOM providers
449                          * to find one with the right guid.
450                          */
451                         cp = vdev_geom_open_by_guid(vd);
452                 }
453         }
454
455         if (cp == NULL) {
456                 ZFS_LOG(1, "Provider %s not found.", vd->vdev_path);
457                 error = ENOENT;
458         } else if (cp->provider->sectorsize > VDEV_PAD_SIZE ||
459             !ISP2(cp->provider->sectorsize)) {
460                 ZFS_LOG(1, "Provider %s has unsupported sectorsize.",
461                     vd->vdev_path);
462                 vdev_geom_detach(cp, 0);
463                 error = EINVAL;
464                 cp = NULL;
465         } else if (cp->acw == 0 && (spa_mode(vd->vdev_spa) & FWRITE) != 0) {
466                 int i;
467
468                 for (i = 0; i < 5; i++) {
469                         error = g_access(cp, 0, 1, 0);
470                         if (error == 0)
471                                 break;
472                         g_topology_unlock();
473                         tsleep(vd, 0, "vdev", hz / 2);
474                         g_topology_lock();
475                 }
476                 if (error != 0) {
477                         printf("ZFS WARNING: Unable to open %s for writing (error=%d).\n",
478                             vd->vdev_path, error);
479                         vdev_geom_detach(cp, 0);
480                         cp = NULL;
481                 }
482         }
483         g_topology_unlock();
484         PICKUP_GIANT();
485         if (cp == NULL) {
486                 vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
487                 return (error);
488         }
489
490         cp->private = vd;
491         vd->vdev_tsd = cp;
492         pp = cp->provider;
493
494         /*
495          * Determine the actual size of the device.
496          */
497         *max_psize = *psize = pp->mediasize;
498
499         /*
500          * Determine the device's minimum transfer size.
501          */
502         *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
503
504         /*
505          * Clear the nowritecache settings, so that on a vdev_reopen()
506          * we will try again.
507          */
508         vd->vdev_nowritecache = B_FALSE;
509
510         if (vd->vdev_physpath != NULL)
511                 spa_strfree(vd->vdev_physpath);
512         bufsize = sizeof("/dev/") + strlen(pp->name);
513         vd->vdev_physpath = kmem_alloc(bufsize, KM_SLEEP);
514         snprintf(vd->vdev_physpath, bufsize, "/dev/%s", pp->name);
515
516         return (0);
517 }
518
519 static void
520 vdev_geom_close(vdev_t *vd)
521 {
522         struct g_consumer *cp;
523
524         cp = vd->vdev_tsd;
525         if (cp == NULL)
526                 return;
527         vd->vdev_tsd = NULL;
528         vd->vdev_delayed_close = B_FALSE;
529         g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL);
530 }
531
532 static void
533 vdev_geom_io_intr(struct bio *bp)
534 {
535         vdev_t *vd;
536         zio_t *zio;
537
538         zio = bp->bio_caller1;
539         vd = zio->io_vd;
540         zio->io_error = bp->bio_error;
541         if (zio->io_error == 0 && bp->bio_resid != 0)
542                 zio->io_error = EIO;
543         if (bp->bio_cmd == BIO_FLUSH && bp->bio_error == ENOTSUP) {
544                 /*
545                  * If we get ENOTSUP, we know that no future
546                  * attempts will ever succeed.  In this case we
547                  * set a persistent bit so that we don't bother
548                  * with the ioctl in the future.
549                  */
550                 vd->vdev_nowritecache = B_TRUE;
551         }
552         if (bp->bio_cmd == BIO_DELETE && bp->bio_error == ENOTSUP) {
553                 /*
554                  * If we get ENOTSUP, we know that no future
555                  * attempts will ever succeed.  In this case we
556                  * set a persistent bit so that we don't bother
557                  * with the ioctl in the future.
558                  */
559                 vd->vdev_notrim = B_TRUE;
560         }
561         if (zio->io_error == EIO && !vd->vdev_remove_wanted) {
562                 /*
563                  * If provider's error is set we assume it is being
564                  * removed.
565                  */
566                 if (bp->bio_to->error != 0) {
567                         /*
568                          * We post the resource as soon as possible, instead of
569                          * when the async removal actually happens, because the
570                          * DE is using this information to discard previous I/O
571                          * errors.
572                          */
573                         /* XXX: zfs_post_remove() can sleep. */
574                         zfs_post_remove(zio->io_spa, vd);
575                         vd->vdev_remove_wanted = B_TRUE;
576                         spa_async_request(zio->io_spa, SPA_ASYNC_REMOVE);
577                 } else if (!vd->vdev_delayed_close) {
578                         vd->vdev_delayed_close = B_TRUE;
579                 }
580         }
581         g_destroy_bio(bp);
582         zio_interrupt(zio);
583 }
584
585 static int
586 vdev_geom_io_start(zio_t *zio)
587 {
588         vdev_t *vd;
589         struct g_consumer *cp;
590         struct bio *bp;
591         int error;
592
593         vd = zio->io_vd;
594
595         if (zio->io_type == ZIO_TYPE_IOCTL) {
596                 /* XXPOLICY */
597                 if (!vdev_readable(vd)) {
598                         zio->io_error = ENXIO;
599                         return (ZIO_PIPELINE_CONTINUE);
600                 }
601
602                 switch (zio->io_cmd) {
603                 case DKIOCFLUSHWRITECACHE:
604                         if (zfs_nocacheflush || vdev_geom_bio_flush_disable)
605                                 break;
606                         if (vd->vdev_nowritecache) {
607                                 zio->io_error = ENOTSUP;
608                                 break;
609                         }
610                         goto sendreq;
611                 case DKIOCTRIM:
612                         if (vdev_geom_bio_delete_disable)
613                                 break;
614                         if (vd->vdev_notrim) {
615                                 zio->io_error = ENOTSUP;
616                                 break;
617                         }
618                         goto sendreq;
619                 default:
620                         zio->io_error = ENOTSUP;
621                 }
622
623                 return (ZIO_PIPELINE_CONTINUE);
624         }
625 sendreq:
626         cp = vd->vdev_tsd;
627         if (cp == NULL) {
628                 zio->io_error = ENXIO;
629                 return (ZIO_PIPELINE_CONTINUE);
630         }
631         bp = g_alloc_bio();
632         bp->bio_caller1 = zio;
633         switch (zio->io_type) {
634         case ZIO_TYPE_READ:
635         case ZIO_TYPE_WRITE:
636                 bp->bio_cmd = zio->io_type == ZIO_TYPE_READ ? BIO_READ : BIO_WRITE;
637                 bp->bio_data = zio->io_data;
638                 bp->bio_offset = zio->io_offset;
639                 bp->bio_length = zio->io_size;
640                 break;
641         case ZIO_TYPE_IOCTL:
642                 switch (zio->io_cmd) {
643                 case DKIOCFLUSHWRITECACHE:
644                         bp->bio_cmd = BIO_FLUSH;
645                         bp->bio_flags |= BIO_ORDERED;
646                         bp->bio_data = NULL;
647                         bp->bio_offset = cp->provider->mediasize;
648                         bp->bio_length = 0;
649                         break;
650                 case DKIOCTRIM:
651                         bp->bio_cmd = BIO_DELETE;
652                         bp->bio_data = NULL;
653                         bp->bio_offset = zio->io_offset;
654                         bp->bio_length = zio->io_size;
655                         break;
656                 }
657                 break;
658         }
659         bp->bio_done = vdev_geom_io_intr;
660
661         g_io_request(bp, cp);
662
663         return (ZIO_PIPELINE_STOP);
664 }
665
666 static void
667 vdev_geom_io_done(zio_t *zio)
668 {
669 }
670
671 static void
672 vdev_geom_hold(vdev_t *vd)
673 {
674 }
675
676 static void
677 vdev_geom_rele(vdev_t *vd)
678 {
679 }
680
681 vdev_ops_t vdev_geom_ops = {
682         vdev_geom_open,
683         vdev_geom_close,
684         vdev_default_asize,
685         vdev_geom_io_start,
686         vdev_geom_io_done,
687         NULL,
688         vdev_geom_hold,
689         vdev_geom_rele,
690         VDEV_TYPE_DISK,         /* name of this vdev type */
691         B_TRUE                  /* leaf vdev */
692 };