]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/xfs_multidisk.h
xfs: log bmap intent items
[thirdparty/xfsprogs-dev.git] / include / xfs_multidisk.h
1 /*
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
7 * published by the Free Software Foundation.
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
17 */
18 #ifndef __XFS_MULTIDISK_H__
19 #define __XFS_MULTIDISK_H__
20
21 #define XFS_DFL_SB_VERSION_BITS \
22 (XFS_SB_VERSION_NLINKBIT | \
23 XFS_SB_VERSION_EXTFLGBIT | \
24 XFS_SB_VERSION_DIRV2BIT)
25
26 #define XFS_DFL_BLOCKSIZE_LOG 12 /* 4096 byte blocks */
27 #define XFS_DINODE_DFL_LOG 8 /* 256 byte inodes */
28 #define XFS_DINODE_DFL_CRC_LOG 9 /* 512 byte inodes for CRCs */
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 */
32 #define XFS_IFLAG_ALIGN true /* -i align defaults on */
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 */
36 #define XFS_DFL_LOG_FACTOR 5 /* default log size, factor */
37 /* with max trans reservation */
38 #define XFS_MAX_INODE_SIG_BITS 32 /* most significant bits in an
39 * inode number that we'll
40 * accept w/o warnings
41 */
42
43 #define XFS_AG_BYTES(bblog) ((long long)BBSIZE << (bblog))
44 #define XFS_AG_MIN_BYTES ((XFS_AG_BYTES(15))) /* 16 MB */
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))
48
49 #define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
50
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
60 extern long long cvtnum(unsigned int blksize, unsigned int sectsize,
61 const char *str);
62
63 /* proto.c */
64 extern char *setup_proto (char *fname);
65 extern void parse_proto (xfs_mount_t *mp, struct fsxattr *fsx, char **pp);
66 extern void res_failed (int err);
67
68 /* maxtrres.c */
69 extern int max_trans_res(unsigned long agsize, int crcs_enabled, int dirversion,
70 int sectorlog, int blocklog, int inodelog, int dirblocklog,
71 int logversion, int log_sunit, int finobt, int rmapbt);
72
73 #endif /* __XFS_MULTIDISK_H__ */