]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - include/xfs_multidisk.h
xfsprogs: Release v4.19.0-rc0
[thirdparty/xfsprogs-dev.git] / include / xfs_multidisk.h
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0
2bd0ea18 2/*
da23017d
NS
3 * Copyright (c) 2000-2001,2004-2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
2bd0ea18 5 */
4a32b9e9
DC
6#ifndef __XFS_MULTIDISK_H__
7#define __XFS_MULTIDISK_H__
2bd0ea18 8
8d537733
NS
9#define XFS_DFL_SB_VERSION_BITS \
10 (XFS_SB_VERSION_NLINKBIT | \
51ca7008
BN
11 XFS_SB_VERSION_EXTFLGBIT | \
12 XFS_SB_VERSION_DIRV2BIT)
8d537733 13
2bd0ea18
NS
14#define XFS_DFL_BLOCKSIZE_LOG 12 /* 4096 byte blocks */
15#define XFS_DINODE_DFL_LOG 8 /* 256 byte inodes */
f7b80291 16#define XFS_DINODE_DFL_CRC_LOG 9 /* 512 byte inodes for CRCs */
2bd0ea18
NS
17#define XFS_MIN_DATA_BLOCKS 100
18#define XFS_MIN_INODE_PERBLOCK 2 /* min inodes per block */
19#define XFS_DFL_IMAXIMUM_PCT 25 /* max % of space for inodes */
2bd0ea18 20#define XFS_MIN_REC_DIRSIZE 12 /* 4096 byte dirblocks (V2) */
88cd79be 21#define XFS_DFL_LOG_FACTOR 5 /* default log size, factor */
2bd0ea18 22 /* with max trans reservation */
6e3140c7 23#define XFS_MAX_INODE_SIG_BITS 32 /* most significant bits in an
8e4b2fda
ES
24 * inode number that we'll
25 * accept w/o warnings
26 */
9440d84d 27
33a4da69
NS
28#define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog))
29#define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */
1974d3f1
DC
30#define XFS_AG_MAX_BYTES ((XFS_AG_BYTES(31))) /* 1 TB */
31#define XFS_AG_MIN_BLOCKS(blog) (XFS_AG_MIN_BYTES >> (blog))
32#define XFS_AG_MAX_BLOCKS(blog) ((XFS_AG_MAX_BYTES - 1) >> (blog))
33a4da69
NS
33
34#define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
35
4a32b9e9
DC
36/*
37 * These values define what we consider a "multi-disk" filesystem. That is, a
38 * filesystem that is likely to be made up of multiple devices, and hence have
39 * some level of parallelism available to it at the IO level.
40 */
41#define XFS_MULTIDISK_AGLOG 5 /* 32 AGs */
42#define XFS_NOMULTIDISK_AGLOG 2 /* 4 AGs */
43#define XFS_MULTIDISK_AGCOUNT (1 << XFS_MULTIDISK_AGLOG)
44
6c855628
DC
45extern long long cvtnum(unsigned int blksize, unsigned int sectsize,
46 const char *str);
9440d84d
NS
47
48/* proto.c */
49extern char *setup_proto (char *fname);
9f064b7e 50extern void parse_proto (xfs_mount_t *mp, struct fsxattr *fsx, char **pp);
9440d84d
NS
51extern void res_failed (int err);
52
4a32b9e9 53#endif /* __XFS_MULTIDISK_H__ */