]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - repair/globals.c
xfsprogs: kill EXTERN macro
[thirdparty/xfsprogs-dev.git] / repair / globals.c
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0
2bd0ea18 2/*
da23017d
NS
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
4 * All Rights Reserved.
2bd0ea18
NS
5 */
6
2bd0ea18 7#include "globals.h"
a5e09451
ES
8
9/* global variables for xfs_repair */
10
11/* arguments and argument flag variables */
12
13char *fs_name; /* name of filesystem */
14int verbose; /* verbose flag, mostly for debugging */
15
16
17/* for reading stuff in manually (bypassing libsim) */
18
19char *iobuf; /* large buffer */
20int iobuf_size;
21char *smallbuf; /* small (1-4 page) buffer */
22int smallbuf_size;
23int sbbuf_size;
24
25/* direct I/O info */
26
27int minio_align; /* min I/O size and alignment */
28int mem_align; /* memory alignment */
29int max_iosize; /* max I/O size */
30
31/* file descriptors */
32
33int fs_fd; /* filesystem fd */
34
35/* command-line flags */
36
37int verbose;
38int no_modify;
39int dangerously; /* live dangerously ... fix ro mount */
40int isa_file;
41int zap_log;
42int dumpcore; /* abort, not exit on fatal errs */
43int force_geo; /* can set geo on low confidence info */
44int assume_xfs; /* assume we have an xfs fs */
45char *log_name; /* Name of log device */
46int log_spec; /* Log dev specified as option */
47char *rt_name; /* Name of realtime device */
48int rt_spec; /* Realtime dev specified as option */
49int convert_lazy_count; /* Convert lazy-count mode on/off */
50int lazy_count; /* What to set if to if converting */
51
52/* misc status variables */
53
54int primary_sb_modified;
55int bad_ino_btree;
56int copied_sunit;
57int fs_is_dirty;
58
59/* for hunting down the root inode */
60
61int need_root_inode;
62int need_root_dotdot;
63
64int need_rbmino;
65int need_rsumino;
66
67int lost_quotas;
68int have_uquotino;
69int have_gquotino;
70int have_pquotino;
71int lost_uquotino;
72int lost_gquotino;
73int lost_pquotino;
74
75xfs_agino_t first_prealloc_ino;
76xfs_agino_t last_prealloc_ino;
77xfs_agblock_t bnobt_root;
78xfs_agblock_t bcntbt_root;
79xfs_agblock_t inobt_root;
80
81/* configuration vars -- fs geometry dependent */
82
83int inodes_per_block;
84int inodes_per_cluster;
85unsigned int glob_agcount;
86int chunks_pblock; /* # of 64-ino chunks per allocation */
87int max_symlink_blocks;
88int64_t fs_max_file_offset;
89
90/* realtime info */
91
92xfs_rtword_t *btmcompute;
93xfs_suminfo_t *sumcompute;
94
95/* inode tree records have full or partial backptr fields ? */
96
97int full_ino_ex_data; /*
98 * if 1, use ino_ex_data_t component
99 * of ino_un union, if 0, use
100 * parent_list_t component. see
101 * incore.h for more details
102 */
103
104#define ORPHANAGE "lost+found"
105
106/* superblock counters */
107
108uint64_t sb_icount; /* allocated (made) inodes */
109uint64_t sb_ifree; /* free inodes */
110uint64_t sb_fdblocks; /* free data blocks */
111uint64_t sb_frextents; /* free realtime extents */
112
113/* superblock geometry info */
114
115xfs_extlen_t sb_inoalignmt;
116uint32_t sb_unit;
117uint32_t sb_width;
118
119struct aglock *ag_locks;
120
121int report_interval;
122uint64_t *prog_rpt_done;
123
124int ag_stride;
125int thread_count;