1*7a7741afSMartin Matuska /* 2*7a7741afSMartin Matuska * CDDL HEADER START 3*7a7741afSMartin Matuska * 4*7a7741afSMartin Matuska * The contents of this file are subject to the terms of the 5*7a7741afSMartin Matuska * Common Development and Distribution License (the "License"). 6*7a7741afSMartin Matuska * You may not use this file except in compliance with the License. 7*7a7741afSMartin Matuska * 8*7a7741afSMartin Matuska * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*7a7741afSMartin Matuska * or https://opensource.org/licenses/CDDL-1.0. 10*7a7741afSMartin Matuska * See the License for the specific language governing permissions 11*7a7741afSMartin Matuska * and limitations under the License. 12*7a7741afSMartin Matuska * 13*7a7741afSMartin Matuska * When distributing Covered Code, include this CDDL HEADER in each 14*7a7741afSMartin Matuska * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*7a7741afSMartin Matuska * If applicable, add the following below this CDDL HEADER, with the 16*7a7741afSMartin Matuska * fields enclosed by brackets "[]" replaced with your own identifying 17*7a7741afSMartin Matuska * information: Portions Copyright [yyyy] [name of copyright owner] 18*7a7741afSMartin Matuska * 19*7a7741afSMartin Matuska * CDDL HEADER END 20*7a7741afSMartin Matuska */ 21*7a7741afSMartin Matuska 22*7a7741afSMartin Matuska /* 23*7a7741afSMartin Matuska * Copyright (c) 2023 by iXsystems, Inc. 24*7a7741afSMartin Matuska */ 25*7a7741afSMartin Matuska 26*7a7741afSMartin Matuska #include <sys/zfs_context.h> 27*7a7741afSMartin Matuska #include <sys/spa.h> 28*7a7741afSMartin Matuska #include <sys/spa_impl.h> 29*7a7741afSMartin Matuska #include <sys/vdev.h> 30*7a7741afSMartin Matuska #include <sys/vdev_impl.h> 31*7a7741afSMartin Matuska 32*7a7741afSMartin Matuska /* 33*7a7741afSMartin Matuska * Check if the reserved boot area is in-use. This is called from 34*7a7741afSMartin Matuska * spa_vdev_attach() when adding a device to a raidz vdev, to ensure that the 35*7a7741afSMartin Matuska * reserved area is available as scratch space for raidz expansion. 36*7a7741afSMartin Matuska * 37*7a7741afSMartin Matuska * This function currently always returns 0. On Linux, there are no known 38*7a7741afSMartin Matuska * external uses of the reserved area. On FreeBSD, the reserved boot area is 39*7a7741afSMartin Matuska * used when booting to a ZFS root from an MBR partition. 40*7a7741afSMartin Matuska * 41*7a7741afSMartin Matuska * Currently nothing using libzpool can add a disk to a pool, so this does 42*7a7741afSMartin Matuska * nothing. 43*7a7741afSMartin Matuska */ 44*7a7741afSMartin Matuska int 45*7a7741afSMartin Matuska vdev_check_boot_reserve(spa_t *spa, vdev_t *childvd) 46*7a7741afSMartin Matuska { 47*7a7741afSMartin Matuska (void) spa; 48*7a7741afSMartin Matuska (void) childvd; 49*7a7741afSMartin Matuska 50*7a7741afSMartin Matuska return (0); 51*7a7741afSMartin Matuska } 52