]>
Commit | Line | Data |
---|---|---|
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 | ||
13 | char *fs_name; /* name of filesystem */ | |
14 | int verbose; /* verbose flag, mostly for debugging */ | |
15 | ||
16 | ||
17 | /* for reading stuff in manually (bypassing libsim) */ | |
18 | ||
19 | char *iobuf; /* large buffer */ | |
20 | int iobuf_size; | |
21 | char *smallbuf; /* small (1-4 page) buffer */ | |
22 | int smallbuf_size; | |
23 | int sbbuf_size; | |
24 | ||
25 | /* direct I/O info */ | |
26 | ||
27 | int minio_align; /* min I/O size and alignment */ | |
28 | int mem_align; /* memory alignment */ | |
29 | int max_iosize; /* max I/O size */ | |
30 | ||
31 | /* file descriptors */ | |
32 | ||
33 | int fs_fd; /* filesystem fd */ | |
34 | ||
35 | /* command-line flags */ | |
36 | ||
37 | int verbose; | |
38 | int no_modify; | |
39 | int dangerously; /* live dangerously ... fix ro mount */ | |
40 | int isa_file; | |
41 | int zap_log; | |
42 | int dumpcore; /* abort, not exit on fatal errs */ | |
43 | int force_geo; /* can set geo on low confidence info */ | |
44 | int assume_xfs; /* assume we have an xfs fs */ | |
45 | char *log_name; /* Name of log device */ | |
46 | int log_spec; /* Log dev specified as option */ | |
47 | char *rt_name; /* Name of realtime device */ | |
48 | int rt_spec; /* Realtime dev specified as option */ | |
49 | int convert_lazy_count; /* Convert lazy-count mode on/off */ | |
50 | int lazy_count; /* What to set if to if converting */ | |
51 | ||
52 | /* misc status variables */ | |
53 | ||
54 | int primary_sb_modified; | |
55 | int bad_ino_btree; | |
56 | int copied_sunit; | |
57 | int fs_is_dirty; | |
58 | ||
59 | /* for hunting down the root inode */ | |
60 | ||
61 | int need_root_inode; | |
62 | int need_root_dotdot; | |
63 | ||
64 | int need_rbmino; | |
65 | int need_rsumino; | |
66 | ||
67 | int lost_quotas; | |
68 | int have_uquotino; | |
69 | int have_gquotino; | |
70 | int have_pquotino; | |
71 | int lost_uquotino; | |
72 | int lost_gquotino; | |
73 | int lost_pquotino; | |
74 | ||
75 | xfs_agino_t first_prealloc_ino; | |
76 | xfs_agino_t last_prealloc_ino; | |
77 | xfs_agblock_t bnobt_root; | |
78 | xfs_agblock_t bcntbt_root; | |
79 | xfs_agblock_t inobt_root; | |
80 | ||
81 | /* configuration vars -- fs geometry dependent */ | |
82 | ||
83 | int inodes_per_block; | |
84 | int inodes_per_cluster; | |
85 | unsigned int glob_agcount; | |
86 | int chunks_pblock; /* # of 64-ino chunks per allocation */ | |
87 | int max_symlink_blocks; | |
88 | int64_t fs_max_file_offset; | |
89 | ||
90 | /* realtime info */ | |
91 | ||
92 | xfs_rtword_t *btmcompute; | |
93 | xfs_suminfo_t *sumcompute; | |
94 | ||
95 | /* inode tree records have full or partial backptr fields ? */ | |
96 | ||
97 | int 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 | ||
108 | uint64_t sb_icount; /* allocated (made) inodes */ | |
109 | uint64_t sb_ifree; /* free inodes */ | |
110 | uint64_t sb_fdblocks; /* free data blocks */ | |
111 | uint64_t sb_frextents; /* free realtime extents */ | |
112 | ||
113 | /* superblock geometry info */ | |
114 | ||
115 | xfs_extlen_t sb_inoalignmt; | |
116 | uint32_t sb_unit; | |
117 | uint32_t sb_width; | |
118 | ||
119 | struct aglock *ag_locks; | |
120 | ||
121 | int report_interval; | |
122 | uint64_t *prog_rpt_done; | |
123 | ||
124 | int ag_stride; | |
125 | int thread_count; |