]>
Commit | Line | Data |
---|---|---|
2bd0ea18 | 1 | /* |
da23017d NS |
2 | * Copyright (c) 2000-2001,2004-2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU General Public License as | |
2bd0ea18 | 7 | * published by the Free Software Foundation. |
da23017d NS |
8 | * |
9 | * This program is distributed in the hope that it would be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with this program; if not, write the Free Software Foundation, | |
16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
2bd0ea18 | 17 | */ |
4a32b9e9 DC |
18 | #ifndef __XFS_MULTIDISK_H__ |
19 | #define __XFS_MULTIDISK_H__ | |
2bd0ea18 | 20 | |
8d537733 NS |
21 | #define XFS_DFL_SB_VERSION_BITS \ |
22 | (XFS_SB_VERSION_NLINKBIT | \ | |
51ca7008 BN |
23 | XFS_SB_VERSION_EXTFLGBIT | \ |
24 | XFS_SB_VERSION_DIRV2BIT) | |
8d537733 | 25 | |
2bd0ea18 NS |
26 | #define XFS_DFL_BLOCKSIZE_LOG 12 /* 4096 byte blocks */ |
27 | #define XFS_DINODE_DFL_LOG 8 /* 256 byte inodes */ | |
f7b80291 | 28 | #define XFS_DINODE_DFL_CRC_LOG 9 /* 512 byte inodes for CRCs */ |
2bd0ea18 NS |
29 | #define XFS_MIN_DATA_BLOCKS 100 |
30 | #define XFS_MIN_INODE_PERBLOCK 2 /* min inodes per block */ | |
31 | #define XFS_DFL_IMAXIMUM_PCT 25 /* max % of space for inodes */ | |
5f1a2100 | 32 | #define XFS_IFLAG_ALIGN true /* -i align defaults on */ |
2bd0ea18 NS |
33 | #define XFS_MIN_REC_DIRSIZE 12 /* 4096 byte dirblocks (V2) */ |
34 | #define XFS_DFL_DIR_VERSION 2 /* default directory version */ | |
35 | #define XFS_DFL_LOG_SIZE 1000 /* default log size, blocks */ | |
88cd79be | 36 | #define XFS_DFL_LOG_FACTOR 5 /* default log size, factor */ |
2bd0ea18 | 37 | /* with max trans reservation */ |
6e3140c7 | 38 | #define XFS_MAX_INODE_SIG_BITS 32 /* most significant bits in an |
8e4b2fda ES |
39 | * inode number that we'll |
40 | * accept w/o warnings | |
41 | */ | |
9440d84d | 42 | |
33a4da69 NS |
43 | #define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog)) |
44 | #define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */ | |
1974d3f1 DC |
45 | #define XFS_AG_MAX_BYTES ((XFS_AG_BYTES(31))) /* 1 TB */ |
46 | #define XFS_AG_MIN_BLOCKS(blog) (XFS_AG_MIN_BYTES >> (blog)) | |
47 | #define XFS_AG_MAX_BLOCKS(blog) ((XFS_AG_MAX_BYTES - 1) >> (blog)) | |
33a4da69 NS |
48 | |
49 | #define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1)) | |
50 | ||
4a32b9e9 DC |
51 | /* |
52 | * These values define what we consider a "multi-disk" filesystem. That is, a | |
53 | * filesystem that is likely to be made up of multiple devices, and hence have | |
54 | * some level of parallelism available to it at the IO level. | |
55 | */ | |
56 | #define XFS_MULTIDISK_AGLOG 5 /* 32 AGs */ | |
57 | #define XFS_NOMULTIDISK_AGLOG 2 /* 4 AGs */ | |
58 | #define XFS_MULTIDISK_AGCOUNT (1 << XFS_MULTIDISK_AGLOG) | |
59 | ||
6c855628 DC |
60 | extern long long cvtnum(unsigned int blksize, unsigned int sectsize, |
61 | const char *str); | |
9440d84d NS |
62 | |
63 | /* proto.c */ | |
64 | extern char *setup_proto (char *fname); | |
9f064b7e | 65 | extern void parse_proto (xfs_mount_t *mp, struct fsxattr *fsx, char **pp); |
9440d84d NS |
66 | extern void res_failed (int err); |
67 | ||
6e3140c7 | 68 | /* maxtrres.c */ |
e5cc9d56 | 69 | extern int max_trans_res(unsigned long agsize, int crcs_enabled, int dirversion, |
88cd79be | 70 | int sectorlog, int blocklog, int inodelog, int dirblocklog, |
c563396a | 71 | int logversion, int log_sunit, int finobt, int rmapbt); |
2bd0ea18 | 72 | |
4a32b9e9 | 73 | #endif /* __XFS_MULTIDISK_H__ */ |