1 // SPDX-License-Identifier: CDDL-1.0 2 /* 3 * CDDL HEADER START 4 * 5 * The contents of this file are subject to the terms of the 6 * Common Development and Distribution License, Version 1.0 only 7 * (the "License"). You may not use this file except in compliance 8 * with the License. 9 * 10 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11 * or https://opensource.org/licenses/CDDL-1.0. 12 * See the License for the specific language governing permissions 13 * and limitations under the License. 14 * 15 * When distributing Covered Code, include this CDDL HEADER in each 16 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17 * If applicable, add the following below this CDDL HEADER, with the 18 * fields enclosed by brackets "[]" replaced with your own identifying 19 * information: Portions Copyright [yyyy] [name of copyright owner] 20 * 21 * CDDL HEADER END 22 */ 23 /* 24 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25 * Use is subject to license terms. 26 */ 27 28 #ifndef _LIBSPL_SYS_PARAM_H 29 #define _LIBSPL_SYS_PARAM_H 30 31 #include_next <sys/param.h> 32 #include <unistd.h> 33 34 /* 35 * File system parameters and macros. 36 * 37 * The file system is made out of blocks of at most MAXBSIZE units, 38 * with smaller units (fragments) only in the last direct block. 39 * MAXBSIZE primarily determines the size of buffers in the buffer 40 * pool. It may be made larger without any effect on existing 41 * file systems; however making it smaller may make some file 42 * systems unmountable. 43 * 44 * Note that the blocked devices are assumed to have DEV_BSIZE 45 * "sectors" and that fragments must be some multiple of this size. 46 */ 47 #define MAXBSIZE 8192 48 #define DEV_BSIZE 512 49 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 50 51 #define MAXNAMELEN 256 52 #define MAXOFFSET_T LLONG_MAX 53 54 #define UID_NOBODY 60001 /* user ID no body */ 55 #define GID_NOBODY UID_NOBODY 56 #define UID_NOACCESS 60002 /* user ID no access */ 57 58 #define MAXUID UINT32_MAX /* max user id */ 59 #define MAXPROJID MAXUID /* max project id */ 60 61 #ifdef PAGESIZE 62 #undef PAGESIZE 63 #endif /* PAGESIZE */ 64 65 extern size_t spl_pagesize(void); 66 #define PAGESIZE (spl_pagesize()) 67 68 #endif 69