Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: GPL-2.0
2#
3# Copyright (c) 2000-2005 Silicon Graphics, Inc.
4# All Rights Reserved.
5#
6
7ccflags-y += -I $(src) # needed for trace events
8ccflags-y += -I $(src)/libxfs
9
10obj-$(CONFIG_XFS_FS) += xfs.o
11
12# this one should be compiled first, as the tracing macros can easily blow up
13xfs-y += xfs_trace.o
14
15# build the libxfs code first
16xfs-y += $(addprefix libxfs/, \
17 xfs_group.o \
18 xfs_ag.o \
19 xfs_ag_resv.o \
20 xfs_alloc.o \
21 xfs_alloc_btree.o \
22 xfs_attr.o \
23 xfs_attr_leaf.o \
24 xfs_attr_remote.o \
25 xfs_bit.o \
26 xfs_bmap.o \
27 xfs_bmap_btree.o \
28 xfs_btree.o \
29 xfs_btree_staging.o \
30 xfs_da_btree.o \
31 xfs_defer.o \
32 xfs_dir2.o \
33 xfs_dir2_block.o \
34 xfs_dir2_data.o \
35 xfs_dir2_leaf.o \
36 xfs_dir2_node.o \
37 xfs_dir2_sf.o \
38 xfs_dquot_buf.o \
39 xfs_exchmaps.o \
40 xfs_ialloc.o \
41 xfs_ialloc_btree.o \
42 xfs_iext_tree.o \
43 xfs_inode_fork.o \
44 xfs_inode_buf.o \
45 xfs_inode_util.o \
46 xfs_log_rlimit.o \
47 xfs_metadir.o \
48 xfs_metafile.o \
49 xfs_parent.o \
50 xfs_rmap.o \
51 xfs_rmap_btree.o \
52 xfs_refcount.o \
53 xfs_refcount_btree.o \
54 xfs_rtrefcount_btree.o \
55 xfs_rtrmap_btree.o \
56 xfs_sb.o \
57 xfs_symlink_remote.o \
58 xfs_trans_inode.o \
59 xfs_trans_resv.o \
60 xfs_trans_space.o \
61 xfs_types.o \
62 )
63# xfs_rtbitmap is shared with libxfs
64xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \
65 xfs_rtbitmap.o \
66 xfs_rtgroup.o \
67 xfs_zones.o \
68 )
69
70# highlevel code
71xfs-y += xfs_aops.o \
72 xfs_attr_inactive.o \
73 xfs_attr_list.o \
74 xfs_bmap_util.o \
75 xfs_bio_io.o \
76 xfs_buf.o \
77 xfs_dahash_test.o \
78 xfs_dir2_readdir.o \
79 xfs_discard.o \
80 xfs_error.o \
81 xfs_exchrange.o \
82 xfs_export.o \
83 xfs_extent_busy.o \
84 xfs_file.o \
85 xfs_filestream.o \
86 xfs_fsmap.o \
87 xfs_fsops.o \
88 xfs_globals.o \
89 xfs_handle.o \
90 xfs_health.o \
91 xfs_icache.o \
92 xfs_ioctl.o \
93 xfs_iomap.o \
94 xfs_iops.o \
95 xfs_inode.o \
96 xfs_itable.o \
97 xfs_iwalk.o \
98 xfs_message.o \
99 xfs_mount.o \
100 xfs_mru_cache.o \
101 xfs_pwork.o \
102 xfs_reflink.o \
103 xfs_stats.o \
104 xfs_super.o \
105 xfs_symlink.o \
106 xfs_sysfs.o \
107 xfs_trans.o \
108 xfs_xattr.o
109
110# low-level transaction/log code
111xfs-y += xfs_log.o \
112 xfs_log_cil.o \
113 xfs_bmap_item.o \
114 xfs_buf_item.o \
115 xfs_buf_item_recover.o \
116 xfs_dquot_item_recover.o \
117 xfs_exchmaps_item.o \
118 xfs_extfree_item.o \
119 xfs_attr_item.o \
120 xfs_icreate_item.o \
121 xfs_inode_item.o \
122 xfs_inode_item_recover.o \
123 xfs_iunlink_item.o \
124 xfs_refcount_item.o \
125 xfs_rmap_item.o \
126 xfs_log_recover.o \
127 xfs_trans_ail.o \
128 xfs_trans_buf.o
129
130# optional features
131xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
132 xfs_dquot_item.o \
133 xfs_trans_dquot.o \
134 xfs_qm_syscalls.o \
135 xfs_qm_bhv.o \
136 xfs_qm.o \
137 xfs_quotaops.o
138
139# xfs_rtbitmap is shared with libxfs
140xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o \
141 xfs_zone_alloc.o \
142 xfs_zone_gc.o \
143 xfs_zone_info.o \
144 xfs_zone_space_resv.o
145
146xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o
147xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o
148xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o
149xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o
150
151# notify failure
152ifeq ($(CONFIG_MEMORY_FAILURE),y)
153xfs-$(CONFIG_FS_DAX) += xfs_notify_failure.o
154endif
155
156xfs-$(CONFIG_XFS_DRAIN_INTENTS) += xfs_drain.o
157xfs-$(CONFIG_XFS_LIVE_HOOKS) += xfs_hooks.o
158xfs-$(CONFIG_XFS_MEMORY_BUFS) += xfs_buf_mem.o
159xfs-$(CONFIG_XFS_BTREE_IN_MEM) += libxfs/xfs_btree_mem.o
160
161# online scrub/repair
162ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y)
163
164# Tracepoints like to blow up, so build that before everything else
165
166xfs-y += $(addprefix scrub/, \
167 trace.o \
168 agb_bitmap.o \
169 agheader.o \
170 alloc.o \
171 attr.o \
172 bitmap.o \
173 bmap.o \
174 btree.o \
175 common.o \
176 dabtree.o \
177 dir.o \
178 dirtree.o \
179 fscounters.o \
180 health.o \
181 ialloc.o \
182 inode.o \
183 iscan.o \
184 listxattr.o \
185 metapath.o \
186 nlinks.o \
187 parent.o \
188 readdir.o \
189 refcount.o \
190 rmap.o \
191 scrub.o \
192 symlink.o \
193 xfarray.o \
194 xfblob.o \
195 xfile.o \
196 )
197
198xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
199
200xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \
201 rgsuper.o \
202 rtbitmap.o \
203 rtrefcount.o \
204 rtrmap.o \
205 rtsummary.o \
206 )
207
208xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \
209 dqiterate.o \
210 quota.o \
211 quotacheck.o \
212 )
213
214# online repair
215ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
216xfs-y += $(addprefix scrub/, \
217 agheader_repair.o \
218 alloc_repair.o \
219 attr_repair.o \
220 bmap_repair.o \
221 cow_repair.o \
222 dir_repair.o \
223 dirtree_repair.o \
224 findparent.o \
225 fscounters_repair.o \
226 ialloc_repair.o \
227 inode_repair.o \
228 newbt.o \
229 nlinks_repair.o \
230 orphanage.o \
231 parent_repair.o \
232 rcbag_btree.o \
233 rcbag.o \
234 reap.o \
235 refcount_repair.o \
236 repair.o \
237 rmap_repair.o \
238 symlink_repair.o \
239 tempfile.o \
240 )
241
242xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \
243 rtbitmap_repair.o \
244 rtrefcount_repair.o \
245 rtrmap_repair.o \
246 rtsummary_repair.o \
247 )
248
249xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \
250 quota_repair.o \
251 quotacheck_repair.o \
252 )
253endif
254endif