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_rtrmap_btree.o \ 55 xfs_sb.o \ 56 xfs_symlink_remote.o \ 57 xfs_trans_inode.o \ 58 xfs_trans_resv.o \ 59 xfs_trans_space.o \ 60 xfs_types.o \ 61 ) 62# xfs_rtbitmap is shared with libxfs 63xfs-$(CONFIG_XFS_RT) += $(addprefix libxfs/, \ 64 xfs_rtbitmap.o \ 65 xfs_rtgroup.o \ 66 ) 67 68# highlevel code 69xfs-y += xfs_aops.o \ 70 xfs_attr_inactive.o \ 71 xfs_attr_list.o \ 72 xfs_bmap_util.o \ 73 xfs_bio_io.o \ 74 xfs_buf.o \ 75 xfs_dahash_test.o \ 76 xfs_dir2_readdir.o \ 77 xfs_discard.o \ 78 xfs_error.o \ 79 xfs_exchrange.o \ 80 xfs_export.o \ 81 xfs_extent_busy.o \ 82 xfs_file.o \ 83 xfs_filestream.o \ 84 xfs_fsmap.o \ 85 xfs_fsops.o \ 86 xfs_globals.o \ 87 xfs_handle.o \ 88 xfs_health.o \ 89 xfs_icache.o \ 90 xfs_ioctl.o \ 91 xfs_iomap.o \ 92 xfs_iops.o \ 93 xfs_inode.o \ 94 xfs_itable.o \ 95 xfs_iwalk.o \ 96 xfs_message.o \ 97 xfs_mount.o \ 98 xfs_mru_cache.o \ 99 xfs_pwork.o \ 100 xfs_reflink.o \ 101 xfs_stats.o \ 102 xfs_super.o \ 103 xfs_symlink.o \ 104 xfs_sysfs.o \ 105 xfs_trans.o \ 106 xfs_xattr.o 107 108# low-level transaction/log code 109xfs-y += xfs_log.o \ 110 xfs_log_cil.o \ 111 xfs_bmap_item.o \ 112 xfs_buf_item.o \ 113 xfs_buf_item_recover.o \ 114 xfs_dquot_item_recover.o \ 115 xfs_exchmaps_item.o \ 116 xfs_extfree_item.o \ 117 xfs_attr_item.o \ 118 xfs_icreate_item.o \ 119 xfs_inode_item.o \ 120 xfs_inode_item_recover.o \ 121 xfs_iunlink_item.o \ 122 xfs_refcount_item.o \ 123 xfs_rmap_item.o \ 124 xfs_log_recover.o \ 125 xfs_trans_ail.o \ 126 xfs_trans_buf.o 127 128# optional features 129xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \ 130 xfs_dquot_item.o \ 131 xfs_trans_dquot.o \ 132 xfs_qm_syscalls.o \ 133 xfs_qm_bhv.o \ 134 xfs_qm.o \ 135 xfs_quotaops.o 136 137# xfs_rtbitmap is shared with libxfs 138xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o 139 140xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o 141xfs-$(CONFIG_SYSCTL) += xfs_sysctl.o 142xfs-$(CONFIG_COMPAT) += xfs_ioctl32.o 143xfs-$(CONFIG_EXPORTFS_BLOCK_OPS) += xfs_pnfs.o 144 145# notify failure 146ifeq ($(CONFIG_MEMORY_FAILURE),y) 147xfs-$(CONFIG_FS_DAX) += xfs_notify_failure.o 148endif 149 150xfs-$(CONFIG_XFS_DRAIN_INTENTS) += xfs_drain.o 151xfs-$(CONFIG_XFS_LIVE_HOOKS) += xfs_hooks.o 152xfs-$(CONFIG_XFS_MEMORY_BUFS) += xfs_buf_mem.o 153xfs-$(CONFIG_XFS_BTREE_IN_MEM) += libxfs/xfs_btree_mem.o 154 155# online scrub/repair 156ifeq ($(CONFIG_XFS_ONLINE_SCRUB),y) 157 158# Tracepoints like to blow up, so build that before everything else 159 160xfs-y += $(addprefix scrub/, \ 161 trace.o \ 162 agb_bitmap.o \ 163 agheader.o \ 164 alloc.o \ 165 attr.o \ 166 bitmap.o \ 167 bmap.o \ 168 btree.o \ 169 common.o \ 170 dabtree.o \ 171 dir.o \ 172 dirtree.o \ 173 fscounters.o \ 174 health.o \ 175 ialloc.o \ 176 inode.o \ 177 iscan.o \ 178 listxattr.o \ 179 metapath.o \ 180 nlinks.o \ 181 parent.o \ 182 readdir.o \ 183 refcount.o \ 184 rmap.o \ 185 scrub.o \ 186 symlink.o \ 187 xfarray.o \ 188 xfblob.o \ 189 xfile.o \ 190 ) 191 192xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o 193 194xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \ 195 rgsuper.o \ 196 rtbitmap.o \ 197 rtsummary.o \ 198 ) 199 200xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \ 201 dqiterate.o \ 202 quota.o \ 203 quotacheck.o \ 204 ) 205 206# online repair 207ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y) 208xfs-y += $(addprefix scrub/, \ 209 agheader_repair.o \ 210 alloc_repair.o \ 211 attr_repair.o \ 212 bmap_repair.o \ 213 cow_repair.o \ 214 dir_repair.o \ 215 dirtree_repair.o \ 216 findparent.o \ 217 fscounters_repair.o \ 218 ialloc_repair.o \ 219 inode_repair.o \ 220 newbt.o \ 221 nlinks_repair.o \ 222 orphanage.o \ 223 parent_repair.o \ 224 rcbag_btree.o \ 225 rcbag.o \ 226 reap.o \ 227 refcount_repair.o \ 228 repair.o \ 229 rmap_repair.o \ 230 symlink_repair.o \ 231 tempfile.o \ 232 ) 233 234xfs-$(CONFIG_XFS_RT) += $(addprefix scrub/, \ 235 rtbitmap_repair.o \ 236 rtsummary_repair.o \ 237 ) 238 239xfs-$(CONFIG_XFS_QUOTA) += $(addprefix scrub/, \ 240 quota_repair.o \ 241 quotacheck_repair.o \ 242 ) 243endif 244endif 245