]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/xfs_multidisk.h
xfs: fix off-by-one error in xfs_rtalloc_query_range
[thirdparty/xfsprogs-dev.git] / include / xfs_multidisk.h
CommitLineData
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 */
2bd0ea18 32#define XFS_MIN_REC_DIRSIZE 12 /* 4096 byte dirblocks (V2) */
88cd79be 33#define XFS_DFL_LOG_FACTOR 5 /* default log size, factor */
2bd0ea18 34 /* with max trans reservation */
6e3140c7 35#define XFS_MAX_INODE_SIG_BITS 32 /* most significant bits in an
8e4b2fda
ES
36 * inode number that we'll
37 * accept w/o warnings
38 */
9440d84d 39
33a4da69
NS
40#define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog))
41#define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */
1974d3f1
DC
42#define XFS_AG_MAX_BYTES ((XFS_AG_BYTES(31))) /* 1 TB */
43#define XFS_AG_MIN_BLOCKS(blog) (XFS_AG_MIN_BYTES >> (blog))
44#define XFS_AG_MAX_BLOCKS(blog) ((XFS_AG_MAX_BYTES - 1) >> (blog))
33a4da69
NS
45
46#define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
47
4a32b9e9
DC
48/*
49 * These values define what we consider a "multi-disk" filesystem. That is, a
50 * filesystem that is likely to be made up of multiple devices, and hence have
51 * some level of parallelism available to it at the IO level.
52 */
53#define XFS_MULTIDISK_AGLOG 5 /* 32 AGs */
54#define XFS_NOMULTIDISK_AGLOG 2 /* 4 AGs */
55#define XFS_MULTIDISK_AGCOUNT (1 << XFS_MULTIDISK_AGLOG)
56
6c855628
DC
57extern long long cvtnum(unsigned int blksize, unsigned int sectsize,
58 const char *str);
9440d84d
NS
59
60/* proto.c */
61extern char *setup_proto (char *fname);
9f064b7e 62extern void parse_proto (xfs_mount_t *mp, struct fsxattr *fsx, char **pp);
9440d84d
NS
63extern void res_failed (int err);
64
4a32b9e9 65#endif /* __XFS_MULTIDISK_H__ */