New/Usr/Src/Common/Zfs/Zfs Prop.C 1

New/Usr/Src/Common/Zfs/Zfs Prop.C 1

new/usr/src/common/zfs/zfs_prop.c 1 new/usr/src/common/zfs/zfs_prop.c 2 ********************************************************** 61 #include <string.h> 13892 Wed Jan 31 21:21:15 2007 62 #include <ctype.h> new/usr/src/common/zfs/zfs_prop.c 63 #endif 1000002 gzip compression for ZFS ********************************************************** 65 typedef enum { 1 /* 66 prop_default, 2 * CDDL HEADER START 67 prop_readonly, 3 * 68 prop_inherit 4 * The contents of this file are subject to the terms of the 69 } prop_attr_t; 5 * Common Development and Distribution License (the "License"). ______unchanged_portion_omitted_ 6 * You may not use this file except in compliance with the License. 7 * 83 static prop_desc_t zfs_prop_table[ZFS_NPROP_ALL] = { 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 84 { "type", prop_type_string, 0, NULL, prop_readonly, 9 * or http://www.opensolaris.org/os/licensing. 85 ZFS_TYPE_ANY, "filesystem | volume | snapshot", "TYPE", B_TRUE }, 10 * See the License for the specific language governing permissions 86 { "creation", prop_type_number, 0, NULL, prop_readonly, 11 * and limitations under the License. 87 ZFS_TYPE_ANY, "<date>", "CREATION", B_FALSE }, 12 * 88 { "used", prop_type_number, 0, NULL, prop_readonly, 13 * When distributing Covered Code, include this CDDL HEADER in each 89 ZFS_TYPE_ANY, "<size>", "USED", B_TRUE }, 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 90 { "available", prop_type_number, 0, NULL, prop_readonly, 15 * If applicable, add the following below this CDDL HEADER, with the 91 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<size>", "AVAIL", B_TRUE }, 16 * fields enclosed by brackets "[]" replaced with your own identifying 92 { "referenced", prop_type_number, 0, NULL, prop_readonly, 17 * information: Portions Copyright [yyyy] [name of copyright owner] 93 ZFS_TYPE_ANY, 18 * 94 "<size>", "REFER", B_TRUE }, 19 * CDDL HEADER END 95 { "compressratio", prop_type_number, 0, NULL, prop_readonly, 20 */ 96 ZFS_TYPE_ANY, "<1.00x or higher if compressed>", "RATIO", B_TRUE }, 21 /* 97 { "mounted", prop_type_boolean, 0, NULL, prop_readonly, 22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 98 ZFS_TYPE_FILESYSTEM, "yes | no | -", "MOUNTED", B_TRUE }, 23 * Use is subject to license terms. 99 { "origin", prop_type_string, 0, NULL, prop_readonly, 24 */ 100 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, "<snapshot>", "ORIGIN", 101 B_FALSE }, 26 #pragma ident "@(#)zfs_prop.c 1.17 07/01/31 SMI" 102 { "quota", prop_type_number, 0, NULL, prop_default, 26 #pragma ident "@(#)zfs_prop.c 1.16 07/01/05 SMI" 103 ZFS_TYPE_FILESYSTEM, "<size> | none", "QUOTA", B_TRUE }, 104 { "reservation", prop_type_number, 0, NULL, prop_default, 28 /* 105 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, 29 * Master property table. 106 "<size> | none", "RESERV", B_TRUE }, 30 * 107 { "volsize", prop_type_number, 0, NULL, prop_default, 31 * This table keeps track of all the properties supported by ZFS, and their 108 ZFS_TYPE_VOLUME, "<size>", "VOLSIZE", B_TRUE }, 32 * various attributes. Not all of these are needed by the kernel, and several 109 { "volblocksize", prop_type_number, 8192, NULL, prop_readonly, 33 * are only used by a single libzfs client. But having them here centralizes 110 ZFS_TYPE_VOLUME, "512 to 128k, power of 2", "VOLBLOCK", B_TRUE }, 34 * all property information in one location. 111 { "recordsize", prop_type_number, SPA_MAXBLOCKSIZE, NULL, 35 * 112 prop_inherit, 36 * name The human-readable string representing this property 113 ZFS_TYPE_FILESYSTEM, 37 * proptype Basic type (string, boolean, number) 114 "512 to 128k, power of 2", "RECSIZE", B_TRUE }, 38 * default Default value for the property. Sadly, C only allows 115 { "mountpoint", prop_type_string, 0, "/", prop_inherit, 39 * you to initialize the first member of a union, so we 116 ZFS_TYPE_FILESYSTEM, 40 * have two default members for each property. 117 "<path> | legacy | none", "MOUNTPOINT", B_FALSE }, 41 * attr Attributes (readonly, inheritable) for the property 118 { "sharenfs", prop_type_string, 0, "off", prop_inherit, 42 * types Valid dataset types to which this applies 119 ZFS_TYPE_FILESYSTEM, 43 * values String describing acceptable values for the property 120 "on | off | share(1M) options", "SHARENFS", B_FALSE }, 44 * colname The column header for 'zfs list' 121 { "shareiscsi", prop_type_string, 0, "off", prop_inherit, 45 * colfmt The column formatting for 'zfs list' 122 ZFS_TYPE_ANY, 46 * 123 "on | off | type=<type>", "SHAREISCSI", B_FALSE }, 47 * This table must match the order of property types in libzfs.h. 124 { "checksum", prop_type_index, ZIO_CHECKSUM_DEFAULT, "on", 48 */ 125 prop_inherit, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, 126 "on | off | fletcher2 | fletcher4 | sha256", "CHECKSUM", B_TRUE }, 50 #include <sys/zio.h> 127 { "compression", prop_type_index, ZIO_COMPRESS_DEFAULT, "off", 51 #include <sys/spa.h> 128 prop_inherit, ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, 52 #include <sys/zfs_acl.h> 129 "on | off | lzjb | gzip", "COMPRESS", B_TRUE }, 53 #include <sys/zfs_ioctl.h> 129 "on | off | lzjb", "COMPRESS", B_TRUE }, 130 { "atime", prop_type_boolean, 1, NULL, prop_inherit, 55 #include "zfs_prop.h" 131 ZFS_TYPE_FILESYSTEM, 132 "on | off", "ATIME", B_TRUE }, 57 #if defined(_KERNEL) 133 { "devices", prop_type_boolean, 1, NULL, prop_inherit, 58 #include <sys/systm.h> 134 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, 59 #else 135 "on | off", "DEVICES", B_TRUE }, 60 #include <stdlib.h> 136 { "exec", prop_type_boolean, 1, NULL, prop_inherit, new/usr/src/common/zfs/zfs_prop.c 3 137 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, 138 "on | off", "EXEC", B_TRUE }, 139 { "setuid", prop_type_boolean, 1, NULL, prop_inherit, 140 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, "on | off", "SETUID", 141 B_TRUE }, 142 { "readonly", prop_type_boolean, 0, NULL, prop_inherit, 143 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME, 144 "on | off", "RDONLY", B_TRUE }, 145 { "zoned", prop_type_boolean, 0, NULL, prop_inherit, 146 ZFS_TYPE_FILESYSTEM, 147 "on | off", "ZONED", B_TRUE }, 148 { "snapdir", prop_type_index, ZFS_SNAPDIR_HIDDEN, "hidden", 149 prop_inherit, 150 ZFS_TYPE_FILESYSTEM, 151 "hidden | visible", "SNAPDIR", B_TRUE }, 152 { "aclmode", prop_type_index, ZFS_ACL_GROUPMASK, "groupmask", 153 prop_inherit, ZFS_TYPE_FILESYSTEM, 154 "discard | groupmask | passthrough", "ACLMODE", B_TRUE }, 155 { "aclinherit", prop_type_index, ZFS_ACL_SECURE, "secure", 156 prop_inherit, ZFS_TYPE_FILESYSTEM, 157 "discard | noallow | secure | passthrough", "ACLINHERIT", B_TRUE }, 158 { "canmount", prop_type_boolean, 1, NULL, prop_default, 159 ZFS_TYPE_FILESYSTEM, 160 "on | off", "CANMOUNT", B_TRUE }, 161 { "xattr", prop_type_boolean, 1, NULL, prop_inherit, 162 ZFS_TYPE_FILESYSTEM | ZFS_TYPE_SNAPSHOT, 163 "on | off", "XATTR", B_TRUE }, 164 { "createtxg", prop_type_number, 0, NULL, prop_readonly, 165 ZFS_TYPE_ANY, NULL, NULL, B_FALSE}, 166 { "name", prop_type_string, 0, NULL, prop_readonly, 167 ZFS_TYPE_ANY, NULL, "NAME", B_FALSE }, 168 { "iscsioptions", prop_type_string, 0, NULL, prop_inherit, 169 ZFS_TYPE_VOLUME, NULL, "ISCSIOPTIONS", B_FALSE }, 170 { "numclones", prop_type_number, 0, NULL, prop_readonly, 171 ZFS_TYPE_SNAPSHOT, NULL, NULL, B_FALSE }, 172 }; ______unchanged_portion_omitted_ 321 static zfs_index_t compress_table[] = { 322 { "on", ZIO_COMPRESS_ON }, 323 { "off", ZIO_COMPRESS_OFF }, 324 { "lzjb", ZIO_COMPRESS_LZJB }, 325 { "gzip", ZIO_COMPRESS_GZIP }, 326 { NULL } 327 }; ______unchanged_portion_omitted_ new/usr/src/lib/libzpool/Makefile.com 1 new/usr/src/lib/libzpool/Makefile.com 2 ********************************************************** 60 C99MODE= -xc99=%all 2269 Wed Jan 31 21:21:15 2007 61 C99LMODE= -Xc99=%all new/usr/src/lib/libzpool/Makefile.com 1000002 gzip compression for ZFS 63 CFLAGS += -g $(CCVERBOSE) $(CNOGLOBAL) ********************************************************** 64 CFLAGS64 += -g $(CCVERBOSE) $(CNOGLOBAL) 1 # 65 LDLIBS += -lumem -lavl -lnvpair -lz -lc 2 # CDDL HEADER START 65 LDLIBS += -lumem -lavl -lnvpair -lc 3 # 66 CPPFLAGS += $(INCS) 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 68 .KEEP_STATE: 6 # You may not use this file except in compliance with the License. 7 # 70 all: $(LIBS) 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 72 lint: $(LINTLIB) 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 74 include ../../Makefile.targ 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 76 pics/%.o: ../../../uts/common/fs/zfs/%.c 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 77 $(COMPILE.c) -o $@ $< 15 # If applicable, add the following below this CDDL HEADER, with the 78 $(POST_PROCESS_O) 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 80 pics/%.o: ../../../common/zfs/%.c 18 # 81 $(COMPILE.c) -o $@ $< 19 # CDDL HEADER END 82 $(POST_PROCESS_O) 20 # 21 # 84 pics/%.o: ../../../uts/common/os/%.c 22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved. 85 $(COMPILE.c) -o $@ $< 22 # Copyright 2006 Sun Microsystems, Inc. All rights reserved. 86 $(POST_PROCESS_O) 23 # Use is subject to license terms. 24 # 25 # ident "@(#)Makefile.com 1.4 07/01/31 SMI" 25 # ident "@(#)Makefile.com 1.3 06/08/03 SMI" 26 # 28 LIBRARY= libzpool.a 29 VERS= .1 31 # include the list of ZFS sources 32 include ../../../uts/common/Makefile.files

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    69 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us