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) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. 24 * Copyright (c) 2012, 2018 by Delphix. All rights reserved. 25 * Copyright (c) 2021, Colm Buckley <colm@tuatha.org> 26 * Copyright (c) 2021, Klara Inc. 27 */ 28 29 #include <sys/zio.h> 30 #include <sys/spa.h> 31 #include <sys/zfs_acl.h> 32 #include <sys/zfs_ioctl.h> 33 #include <sys/fs/zfs.h> 34 35 #include "zfs_prop.h" 36 37 #if !defined(_KERNEL) 38 #include <stdlib.h> 39 #include <string.h> 40 #include <ctype.h> 41 #endif 42 43 static zprop_desc_t zpool_prop_table[ZPOOL_NUM_PROPS]; 44 static zprop_desc_t vdev_prop_table[VDEV_NUM_PROPS]; 45 46 zprop_desc_t * 47 zpool_prop_get_table(void) 48 { 49 return (zpool_prop_table); 50 } 51 52 void 53 zpool_prop_init(void) 54 { 55 static zprop_index_t boolean_table[] = { 56 { "off", 0}, 57 { "on", 1}, 58 { NULL } 59 }; 60 61 static zprop_index_t failuremode_table[] = { 62 { "wait", ZIO_FAILURE_MODE_WAIT }, 63 { "continue", ZIO_FAILURE_MODE_CONTINUE }, 64 { "panic", ZIO_FAILURE_MODE_PANIC }, 65 { NULL } 66 }; 67 68 /* string properties */ 69 zprop_register_string(ZPOOL_PROP_ALTROOT, "altroot", NULL, PROP_DEFAULT, 70 ZFS_TYPE_POOL, "<path>", "ALTROOT"); 71 zprop_register_string(ZPOOL_PROP_BOOTFS, "bootfs", NULL, PROP_DEFAULT, 72 ZFS_TYPE_POOL, "<filesystem>", "BOOTFS"); 73 zprop_register_string(ZPOOL_PROP_CACHEFILE, "cachefile", NULL, 74 PROP_DEFAULT, ZFS_TYPE_POOL, "<file> | none", "CACHEFILE"); 75 zprop_register_string(ZPOOL_PROP_COMMENT, "comment", NULL, 76 PROP_DEFAULT, ZFS_TYPE_POOL, "<comment-string>", "COMMENT"); 77 zprop_register_string(ZPOOL_PROP_COMPATIBILITY, "compatibility", 78 "off", PROP_DEFAULT, ZFS_TYPE_POOL, 79 "<file[,file...]> | off | legacy", "COMPATIBILITY"); 80 81 /* readonly number properties */ 82 zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY, 83 ZFS_TYPE_POOL, "<size>", "SIZE"); 84 zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY, 85 ZFS_TYPE_POOL, "<size>", "FREE"); 86 zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY, 87 ZFS_TYPE_POOL, "<size>", "FREEING"); 88 zprop_register_number(ZPOOL_PROP_CHECKPOINT, "checkpoint", 0, 89 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "CKPOINT"); 90 zprop_register_number(ZPOOL_PROP_LEAKED, "leaked", 0, PROP_READONLY, 91 ZFS_TYPE_POOL, "<size>", "LEAKED"); 92 zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0, 93 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC"); 94 zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0, 95 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ"); 96 zprop_register_number(ZPOOL_PROP_FRAGMENTATION, "fragmentation", 0, 97 PROP_READONLY, ZFS_TYPE_POOL, "<percent>", "FRAG"); 98 zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY, 99 ZFS_TYPE_POOL, "<size>", "CAP"); 100 zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY, 101 ZFS_TYPE_POOL, "<guid>", "GUID"); 102 zprop_register_number(ZPOOL_PROP_LOAD_GUID, "load_guid", 0, 103 PROP_READONLY, ZFS_TYPE_POOL, "<load_guid>", "LOAD_GUID"); 104 zprop_register_number(ZPOOL_PROP_HEALTH, "health", 0, PROP_READONLY, 105 ZFS_TYPE_POOL, "<state>", "HEALTH"); 106 zprop_register_number(ZPOOL_PROP_DEDUPRATIO, "dedupratio", 0, 107 PROP_READONLY, ZFS_TYPE_POOL, "<1.00x or higher if deduped>", 108 "DEDUP"); 109 110 /* default number properties */ 111 zprop_register_number(ZPOOL_PROP_VERSION, "version", SPA_VERSION, 112 PROP_DEFAULT, ZFS_TYPE_POOL, "<version>", "VERSION"); 113 zprop_register_number(ZPOOL_PROP_ASHIFT, "ashift", 0, PROP_DEFAULT, 114 ZFS_TYPE_POOL, "<ashift, 9-16, or 0=default>", "ASHIFT"); 115 116 /* default index (boolean) properties */ 117 zprop_register_index(ZPOOL_PROP_DELEGATION, "delegation", 1, 118 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DELEGATION", 119 boolean_table); 120 zprop_register_index(ZPOOL_PROP_AUTOREPLACE, "autoreplace", 0, 121 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "REPLACE", boolean_table); 122 zprop_register_index(ZPOOL_PROP_LISTSNAPS, "listsnapshots", 0, 123 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "LISTSNAPS", 124 boolean_table); 125 zprop_register_index(ZPOOL_PROP_AUTOEXPAND, "autoexpand", 0, 126 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "EXPAND", boolean_table); 127 zprop_register_index(ZPOOL_PROP_READONLY, "readonly", 0, 128 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "RDONLY", boolean_table); 129 zprop_register_index(ZPOOL_PROP_MULTIHOST, "multihost", 0, 130 PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "MULTIHOST", 131 boolean_table); 132 133 /* default index properties */ 134 zprop_register_index(ZPOOL_PROP_FAILUREMODE, "failmode", 135 ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL, 136 "wait | continue | panic", "FAILMODE", failuremode_table); 137 zprop_register_index(ZPOOL_PROP_AUTOTRIM, "autotrim", 138 SPA_AUTOTRIM_DEFAULT, PROP_DEFAULT, ZFS_TYPE_POOL, 139 "on | off", "AUTOTRIM", boolean_table); 140 141 /* hidden properties */ 142 zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING, 143 PROP_READONLY, ZFS_TYPE_POOL, "NAME"); 144 zprop_register_hidden(ZPOOL_PROP_MAXBLOCKSIZE, "maxblocksize", 145 PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXBLOCKSIZE"); 146 zprop_register_hidden(ZPOOL_PROP_TNAME, "tname", PROP_TYPE_STRING, 147 PROP_ONETIME, ZFS_TYPE_POOL, "TNAME"); 148 zprop_register_hidden(ZPOOL_PROP_MAXDNODESIZE, "maxdnodesize", 149 PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_POOL, "MAXDNODESIZE"); 150 zprop_register_hidden(ZPOOL_PROP_DEDUPDITTO, "dedupditto", 151 PROP_TYPE_NUMBER, PROP_DEFAULT, ZFS_TYPE_POOL, "DEDUPDITTO"); 152 } 153 154 /* 155 * Given a property name and its type, returns the corresponding property ID. 156 */ 157 zpool_prop_t 158 zpool_name_to_prop(const char *propname) 159 { 160 return (zprop_name_to_prop(propname, ZFS_TYPE_POOL)); 161 } 162 163 /* 164 * Given a pool property ID, returns the corresponding name. 165 * Assuming the pool property ID is valid. 166 */ 167 const char * 168 zpool_prop_to_name(zpool_prop_t prop) 169 { 170 return (zpool_prop_table[prop].pd_name); 171 } 172 173 zprop_type_t 174 zpool_prop_get_type(zpool_prop_t prop) 175 { 176 return (zpool_prop_table[prop].pd_proptype); 177 } 178 179 boolean_t 180 zpool_prop_readonly(zpool_prop_t prop) 181 { 182 return (zpool_prop_table[prop].pd_attr == PROP_READONLY); 183 } 184 185 boolean_t 186 zpool_prop_setonce(zpool_prop_t prop) 187 { 188 return (zpool_prop_table[prop].pd_attr == PROP_ONETIME); 189 } 190 191 const char * 192 zpool_prop_default_string(zpool_prop_t prop) 193 { 194 return (zpool_prop_table[prop].pd_strdefault); 195 } 196 197 uint64_t 198 zpool_prop_default_numeric(zpool_prop_t prop) 199 { 200 return (zpool_prop_table[prop].pd_numdefault); 201 } 202 203 /* 204 * Returns true if this is a valid feature@ property. 205 */ 206 boolean_t 207 zpool_prop_feature(const char *name) 208 { 209 static const char *prefix = "feature@"; 210 return (strncmp(name, prefix, strlen(prefix)) == 0); 211 } 212 213 /* 214 * Returns true if this is a valid unsupported@ property. 215 */ 216 boolean_t 217 zpool_prop_unsupported(const char *name) 218 { 219 static const char *prefix = "unsupported@"; 220 return (strncmp(name, prefix, strlen(prefix)) == 0); 221 } 222 223 int 224 zpool_prop_string_to_index(zpool_prop_t prop, const char *string, 225 uint64_t *index) 226 { 227 return (zprop_string_to_index(prop, string, index, ZFS_TYPE_POOL)); 228 } 229 230 int 231 zpool_prop_index_to_string(zpool_prop_t prop, uint64_t index, 232 const char **string) 233 { 234 return (zprop_index_to_string(prop, index, string, ZFS_TYPE_POOL)); 235 } 236 237 uint64_t 238 zpool_prop_random_value(zpool_prop_t prop, uint64_t seed) 239 { 240 return (zprop_random_value(prop, seed, ZFS_TYPE_POOL)); 241 } 242 243 #ifndef _KERNEL 244 #include <libzfs.h> 245 246 const char * 247 zpool_prop_values(zpool_prop_t prop) 248 { 249 return (zpool_prop_table[prop].pd_values); 250 } 251 252 const char * 253 zpool_prop_column_name(zpool_prop_t prop) 254 { 255 return (zpool_prop_table[prop].pd_colname); 256 } 257 258 boolean_t 259 zpool_prop_align_right(zpool_prop_t prop) 260 { 261 return (zpool_prop_table[prop].pd_rightalign); 262 } 263 #endif 264 265 zprop_desc_t * 266 vdev_prop_get_table(void) 267 { 268 return (vdev_prop_table); 269 } 270 271 void 272 vdev_prop_init(void) 273 { 274 static zprop_index_t boolean_table[] = { 275 { "off", 0}, 276 { "on", 1}, 277 { NULL } 278 }; 279 static zprop_index_t boolean_na_table[] = { 280 { "off", 0}, 281 { "on", 1}, 282 { "-", 2}, /* ZPROP_BOOLEAN_NA */ 283 { NULL } 284 }; 285 286 /* string properties */ 287 zprop_register_string(VDEV_PROP_COMMENT, "comment", NULL, 288 PROP_DEFAULT, ZFS_TYPE_VDEV, "<comment-string>", "COMMENT"); 289 zprop_register_string(VDEV_PROP_PATH, "path", NULL, 290 PROP_DEFAULT, ZFS_TYPE_VDEV, "<device-path>", "PATH"); 291 zprop_register_string(VDEV_PROP_DEVID, "devid", NULL, 292 PROP_READONLY, ZFS_TYPE_VDEV, "<devid>", "DEVID"); 293 zprop_register_string(VDEV_PROP_PHYS_PATH, "physpath", NULL, 294 PROP_READONLY, ZFS_TYPE_VDEV, "<physpath>", "PHYSPATH"); 295 zprop_register_string(VDEV_PROP_ENC_PATH, "encpath", NULL, 296 PROP_READONLY, ZFS_TYPE_VDEV, "<encpath>", "ENCPATH"); 297 zprop_register_string(VDEV_PROP_FRU, "fru", NULL, 298 PROP_READONLY, ZFS_TYPE_VDEV, "<fru>", "FRU"); 299 zprop_register_string(VDEV_PROP_PARENT, "parent", NULL, 300 PROP_READONLY, ZFS_TYPE_VDEV, "<parent>", "PARENT"); 301 zprop_register_string(VDEV_PROP_CHILDREN, "children", NULL, 302 PROP_READONLY, ZFS_TYPE_VDEV, "<child[,...]>", "CHILDREN"); 303 304 /* readonly number properties */ 305 zprop_register_number(VDEV_PROP_SIZE, "size", 0, PROP_READONLY, 306 ZFS_TYPE_VDEV, "<size>", "SIZE"); 307 zprop_register_number(VDEV_PROP_FREE, "free", 0, PROP_READONLY, 308 ZFS_TYPE_VDEV, "<size>", "FREE"); 309 zprop_register_number(VDEV_PROP_ALLOCATED, "allocated", 0, 310 PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "ALLOC"); 311 zprop_register_number(VDEV_PROP_EXPANDSZ, "expandsize", 0, 312 PROP_READONLY, ZFS_TYPE_VDEV, "<size>", "EXPANDSZ"); 313 zprop_register_number(VDEV_PROP_FRAGMENTATION, "fragmentation", 0, 314 PROP_READONLY, ZFS_TYPE_VDEV, "<percent>", "FRAG"); 315 zprop_register_number(VDEV_PROP_CAPACITY, "capacity", 0, PROP_READONLY, 316 ZFS_TYPE_VDEV, "<size>", "CAP"); 317 zprop_register_number(VDEV_PROP_GUID, "guid", 0, PROP_READONLY, 318 ZFS_TYPE_VDEV, "<guid>", "GUID"); 319 zprop_register_number(VDEV_PROP_STATE, "state", 0, PROP_READONLY, 320 ZFS_TYPE_VDEV, "<state>", "STATE"); 321 zprop_register_number(VDEV_PROP_BOOTSIZE, "bootsize", 0, PROP_READONLY, 322 ZFS_TYPE_VDEV, "<size>", "BOOTSIZE"); 323 zprop_register_number(VDEV_PROP_ASIZE, "asize", 0, PROP_READONLY, 324 ZFS_TYPE_VDEV, "<asize>", "ASIZE"); 325 zprop_register_number(VDEV_PROP_PSIZE, "psize", 0, PROP_READONLY, 326 ZFS_TYPE_VDEV, "<psize>", "PSIZE"); 327 zprop_register_number(VDEV_PROP_ASHIFT, "ashift", 0, PROP_READONLY, 328 ZFS_TYPE_VDEV, "<ashift>", "ASHIFT"); 329 zprop_register_number(VDEV_PROP_PARITY, "parity", 0, PROP_READONLY, 330 ZFS_TYPE_VDEV, "<parity>", "PARITY"); 331 zprop_register_number(VDEV_PROP_NUMCHILDREN, "numchildren", 0, 332 PROP_READONLY, ZFS_TYPE_VDEV, "<number-of-children>", "NUMCHILD"); 333 zprop_register_number(VDEV_PROP_READ_ERRORS, "read_errors", 0, 334 PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "RDERR"); 335 zprop_register_number(VDEV_PROP_WRITE_ERRORS, "write_errors", 0, 336 PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "WRERR"); 337 zprop_register_number(VDEV_PROP_CHECKSUM_ERRORS, "checksum_errors", 0, 338 PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", "CKERR"); 339 zprop_register_number(VDEV_PROP_INITIALIZE_ERRORS, 340 "initialize_errors", 0, PROP_READONLY, ZFS_TYPE_VDEV, "<errors>", 341 "INITERR"); 342 zprop_register_number(VDEV_PROP_OPS_NULL, "null_ops", 0, 343 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "NULLOP"); 344 zprop_register_number(VDEV_PROP_OPS_READ, "read_ops", 0, 345 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "READOP"); 346 zprop_register_number(VDEV_PROP_OPS_WRITE, "write_ops", 0, 347 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "WRITEOP"); 348 zprop_register_number(VDEV_PROP_OPS_FREE, "free_ops", 0, 349 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "FREEOP"); 350 zprop_register_number(VDEV_PROP_OPS_CLAIM, "claim_ops", 0, 351 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "CLAIMOP"); 352 zprop_register_number(VDEV_PROP_OPS_TRIM, "trim_ops", 0, 353 PROP_READONLY, ZFS_TYPE_VDEV, "<operations>", "TRIMOP"); 354 zprop_register_number(VDEV_PROP_BYTES_NULL, "null_bytes", 0, 355 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "NULLBYTE"); 356 zprop_register_number(VDEV_PROP_BYTES_READ, "read_bytes", 0, 357 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "READBYTE"); 358 zprop_register_number(VDEV_PROP_BYTES_WRITE, "write_bytes", 0, 359 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "WRITEBYTE"); 360 zprop_register_number(VDEV_PROP_BYTES_FREE, "free_bytes", 0, 361 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "FREEBYTE"); 362 zprop_register_number(VDEV_PROP_BYTES_CLAIM, "claim_bytes", 0, 363 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "CLAIMBYTE"); 364 zprop_register_number(VDEV_PROP_BYTES_TRIM, "trim_bytes", 0, 365 PROP_READONLY, ZFS_TYPE_VDEV, "<bytes>", "TRIMBYTE"); 366 367 /* default numeric properties */ 368 369 /* default index (boolean) properties */ 370 zprop_register_index(VDEV_PROP_REMOVING, "removing", 0, 371 PROP_READONLY, ZFS_TYPE_VDEV, "on | off", "REMOVING", 372 boolean_table); 373 zprop_register_index(VDEV_PROP_ALLOCATING, "allocating", 1, 374 PROP_DEFAULT, ZFS_TYPE_VDEV, "on | off", "ALLOCATING", 375 boolean_na_table); 376 377 /* default index properties */ 378 379 /* hidden properties */ 380 zprop_register_hidden(VDEV_PROP_NAME, "name", PROP_TYPE_STRING, 381 PROP_READONLY, ZFS_TYPE_VDEV, "NAME"); 382 } 383 384 /* 385 * Given a property name and its type, returns the corresponding property ID. 386 */ 387 vdev_prop_t 388 vdev_name_to_prop(const char *propname) 389 { 390 return (zprop_name_to_prop(propname, ZFS_TYPE_VDEV)); 391 } 392 393 /* 394 * Returns true if this is a valid user-defined property (one with a ':'). 395 */ 396 boolean_t 397 vdev_prop_user(const char *name) 398 { 399 int i; 400 char c; 401 boolean_t foundsep = B_FALSE; 402 403 for (i = 0; i < strlen(name); i++) { 404 c = name[i]; 405 if (!zprop_valid_char(c)) 406 return (B_FALSE); 407 if (c == ':') 408 foundsep = B_TRUE; 409 } 410 411 return (foundsep); 412 } 413 414 /* 415 * Given a pool property ID, returns the corresponding name. 416 * Assuming the pool property ID is valid. 417 */ 418 const char * 419 vdev_prop_to_name(vdev_prop_t prop) 420 { 421 return (vdev_prop_table[prop].pd_name); 422 } 423 424 zprop_type_t 425 vdev_prop_get_type(vdev_prop_t prop) 426 { 427 return (vdev_prop_table[prop].pd_proptype); 428 } 429 430 boolean_t 431 vdev_prop_readonly(vdev_prop_t prop) 432 { 433 return (vdev_prop_table[prop].pd_attr == PROP_READONLY); 434 } 435 436 const char * 437 vdev_prop_default_string(vdev_prop_t prop) 438 { 439 return (vdev_prop_table[prop].pd_strdefault); 440 } 441 442 uint64_t 443 vdev_prop_default_numeric(vdev_prop_t prop) 444 { 445 return (vdev_prop_table[prop].pd_numdefault); 446 } 447 448 int 449 vdev_prop_string_to_index(vdev_prop_t prop, const char *string, 450 uint64_t *index) 451 { 452 return (zprop_string_to_index(prop, string, index, ZFS_TYPE_VDEV)); 453 } 454 455 int 456 vdev_prop_index_to_string(vdev_prop_t prop, uint64_t index, 457 const char **string) 458 { 459 return (zprop_index_to_string(prop, index, string, ZFS_TYPE_VDEV)); 460 } 461 462 /* 463 * Returns true if this is a valid vdev property. 464 */ 465 boolean_t 466 zpool_prop_vdev(const char *name) 467 { 468 return (vdev_name_to_prop(name) != VDEV_PROP_INVAL); 469 } 470 471 uint64_t 472 vdev_prop_random_value(vdev_prop_t prop, uint64_t seed) 473 { 474 return (zprop_random_value(prop, seed, ZFS_TYPE_VDEV)); 475 } 476 477 #ifndef _KERNEL 478 const char * 479 vdev_prop_values(vdev_prop_t prop) 480 { 481 return (vdev_prop_table[prop].pd_values); 482 } 483 484 const char * 485 vdev_prop_column_name(vdev_prop_t prop) 486 { 487 return (vdev_prop_table[prop].pd_colname); 488 } 489 490 boolean_t 491 vdev_prop_align_right(vdev_prop_t prop) 492 { 493 return (vdev_prop_table[prop].pd_rightalign); 494 } 495 #endif 496 497 #if defined(_KERNEL) 498 /* zpool property functions */ 499 EXPORT_SYMBOL(zpool_prop_init); 500 EXPORT_SYMBOL(zpool_prop_get_type); 501 EXPORT_SYMBOL(zpool_prop_get_table); 502 503 /* vdev property functions */ 504 EXPORT_SYMBOL(vdev_prop_init); 505 EXPORT_SYMBOL(vdev_prop_get_type); 506 EXPORT_SYMBOL(vdev_prop_get_table); 507 508 /* Pool property functions shared between libzfs and kernel. */ 509 EXPORT_SYMBOL(zpool_name_to_prop); 510 EXPORT_SYMBOL(zpool_prop_to_name); 511 EXPORT_SYMBOL(zpool_prop_default_string); 512 EXPORT_SYMBOL(zpool_prop_default_numeric); 513 EXPORT_SYMBOL(zpool_prop_readonly); 514 EXPORT_SYMBOL(zpool_prop_feature); 515 EXPORT_SYMBOL(zpool_prop_unsupported); 516 EXPORT_SYMBOL(zpool_prop_index_to_string); 517 EXPORT_SYMBOL(zpool_prop_string_to_index); 518 EXPORT_SYMBOL(zpool_prop_vdev); 519 520 /* vdev property functions shared between libzfs and kernel. */ 521 EXPORT_SYMBOL(vdev_name_to_prop); 522 EXPORT_SYMBOL(vdev_prop_user); 523 EXPORT_SYMBOL(vdev_prop_to_name); 524 EXPORT_SYMBOL(vdev_prop_default_string); 525 EXPORT_SYMBOL(vdev_prop_default_numeric); 526 EXPORT_SYMBOL(vdev_prop_readonly); 527 EXPORT_SYMBOL(vdev_prop_index_to_string); 528 EXPORT_SYMBOL(vdev_prop_string_to_index); 529 #endif 530