]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: remove CONFIG_XFS_QUOTA xfs-config-options
authorChristoph Hellwig <hch@lst.de>
Thu, 19 Sep 2024 06:13:21 +0000 (08:13 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 20 Sep 2024 15:29:08 +0000 (17:29 +0200)
CONFIG_XFS_QUOTA guards support for quota accounting in XFS, and
thus requires a lot of stubs and ifdefs to support builds without
it.  Unconditionally enable quota support to simplify maintenance.
This increases the size of xfs.ko by about 1MB compared to builds
without quota support.

Signed-off-by: Christoph Hellwig <hch@lst.de>
35 files changed:
arch/loongarch/configs/loongson3_defconfig
arch/mips/configs/ip22_defconfig
arch/mips/configs/ip27_defconfig
arch/mips/configs/ip30_defconfig
arch/mips/configs/jazz_defconfig
arch/mips/configs/lemote2f_defconfig
arch/mips/configs/loongson2k_defconfig
arch/mips/configs/malta_defconfig
arch/mips/configs/malta_kvm_defconfig
arch/mips/configs/malta_qemu_32r6_defconfig
arch/mips/configs/maltaaprp_defconfig
arch/mips/configs/maltasmvp_defconfig
arch/mips/configs/maltasmvp_eva_defconfig
arch/mips/configs/maltaup_defconfig
arch/mips/configs/maltaup_xpa_defconfig
arch/mips/configs/rm200_defconfig
arch/powerpc/configs/ppc6xx_defconfig
arch/s390/configs/debug_defconfig
arch/s390/configs/defconfig
fs/xfs/Kconfig
fs/xfs/Makefile
fs/xfs/libxfs/xfs_exchmaps.c
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.h
fs/xfs/scrub/trace.h
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_buf_item_recover.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_quota.h
fs/xfs/xfs_stats.c
fs/xfs/xfs_super.c
fs/xfs/xfs_super.h

index d1c16196f94237bca5dbfdd829af748af893a994..68c4e8b19381c2b2afdd5cb22214ec74f0bb4212 100644 (file)
@@ -842,7 +842,6 @@ CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_DLM=y
 CONFIG_OCFS2_FS=m
index e22e8b825903fafa343338d72e345bc1ad93230f..56323d04849f8c4e2f0d40b77e5095b253936ad3 100644 (file)
@@ -238,7 +238,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
 # CONFIG_PRINT_QUOTA_WARNING is not set
index 922bd6c05a7bd65792b2a5ebda514998db8de156..753100f0651dc7b1f71f7ac9b6b6747641c0edb6 100644 (file)
@@ -280,7 +280,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_BTRFS_FS=m
 CONFIG_BTRFS_FS_POSIX_ACL=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
index 2e4315ff580a6cb0a320b5a2fad08de69f98ef13..88bb2cd9c586e9bed278ce005783431a20c45be1 100644 (file)
@@ -147,7 +147,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_BTRFS_FS=m
 CONFIG_BTRFS_FS_POSIX_ACL=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
index 65adb538030d02e0ae979c9d278930948ab155b9..231cf31a51cfe44e3152d01f5be9e10e3bcefafd 100644 (file)
@@ -71,7 +71,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_EXT2_FS=m
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_AUTOFS_FS=m
 CONFIG_FUSE_FS=m
 CONFIG_ISO9660_FS=m
index 93c887461822da43dd1bb4867897e51dd9b4ab88..37f1273ff8bbddac263f47cfd0402d75ffd682a6 100644 (file)
@@ -232,7 +232,6 @@ CONFIG_EXT3_FS_SECURITY=y
 CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_BTRFS_FS=m
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=m
index 415aa7c31ba42c87a8e770f38c628615b78f4c06..788bb3337a9a125f6c377d5c7945a3242f11b85f 100644 (file)
@@ -292,7 +292,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 # CONFIG_PRINT_QUOTA_WARNING is not set
 CONFIG_AUTOFS_FS=y
index 54afa3c4dd20e453c9e67d1a5aebe3d1270fe06d..70932798e11520cd839b20605102557bf4432cdc 100644 (file)
@@ -320,7 +320,6 @@ CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_FUSE_FS=m
index 78e64a3da9ec3c33a7db22e75bfd3cac3f50e34b..6894dd7c89367ccf22e9955d02fb4118518e0f47 100644 (file)
@@ -326,7 +326,6 @@ CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_FUSE_FS=m
index 7078b006cdef39691cb6f9d1ff9a08a0bc044555..d4c354ba3dc988c8cb03450993496bd7c48f747f 100644 (file)
@@ -151,7 +151,6 @@ CONFIG_RTC_DRV_CMOS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_MSDOS_FS=m
index 9d84f273f7f41256bcafb11b814d762e0bbbabfe..430bc1db1e50e79eed562f9c93ad4b508845fd6b 100644 (file)
@@ -152,7 +152,6 @@ CONFIG_RTC_DRV_CMOS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_MSDOS_FS=m
index d70c4daf1250273513d849969d2b3362ad4cb4cb..5e978138a779f5cb7fc9f3bc1189bbab1c0e4840 100644 (file)
@@ -153,7 +153,6 @@ CONFIG_EXT3_FS=y
 CONFIG_EXT3_FS_POSIX_ACL=y
 CONFIG_EXT3_FS_SECURITY=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_MSDOS_FS=m
index cedc54da86e03774c7c00f4fc45ff37d31b623ef..a8feb6b9990f0f87a442339532a70bd8a448db37 100644 (file)
@@ -155,7 +155,6 @@ CONFIG_RTC_DRV_CMOS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_MSDOS_FS=m
index fd27cbebb486fac77c0b66e62b79dd4de09f0d64..48476f06688d15cdf8f93198bed1173d5598b03a 100644 (file)
@@ -151,7 +151,6 @@ CONFIG_RTC_DRV_CMOS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_MSDOS_FS=m
index b80afc696e0e9d626f9e1e8dd74746879bdd1981..396b4aa121050a412100cb93d61d47ac4298b6ef 100644 (file)
@@ -326,7 +326,6 @@ CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_QUOTA=y
 CONFIG_QFMT_V2=y
 CONFIG_FUSE_FS=m
index 08e1c1f2f4debf122cbbdfd02932b7c1db437ed8..5b6c8864f9a1269a37600786fb3454b0d3fc1eb4 100644 (file)
@@ -311,7 +311,6 @@ CONFIG_USB_TEST=m
 CONFIG_EXT2_FS=m
 CONFIG_EXT3_FS=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_AUTOFS_FS=m
 CONFIG_FUSE_FS=m
 CONFIG_ISO9660_FS=m
index 7a9948c588de1c77d0b89e50e0472b1281f46da3..6d23126e0a5e695b227e5067d64b4ced233c66f4 100644 (file)
@@ -956,7 +956,6 @@ CONFIG_JFS_FS=m
 CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=y
 CONFIG_GFS2_FS=m
 CONFIG_FS_DAX=y
 CONFIG_QUOTA_NETLINK_INTERFACE=y
index 50b6417eb12ec296a2ce0edad71180a649208bf7..df5c3153e024c017986f504a06c069f1d1a1f68e 100644 (file)
@@ -627,7 +627,6 @@ CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_JFS_STATISTICS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_XFS_DEBUG=y
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_DLM=y
index 82d35b8d4b4d17b731f597f57c4c1a25ea2f77b4..8292e265b7b7b579083a6533acc380204810b2a4 100644 (file)
@@ -618,7 +618,6 @@ CONFIG_JFS_POSIX_ACL=y
 CONFIG_JFS_SECURITY=y
 CONFIG_JFS_STATISTICS=y
 CONFIG_XFS_FS=y
-CONFIG_XFS_QUOTA=y
 CONFIG_GFS2_FS=m
 CONFIG_GFS2_FS_LOCKING_DLM=y
 CONFIG_OCFS2_FS=m
index 9d1a47e4cfbe94db173e7da3dc7f314c2de85584..bd1c6421f86ec16bd5cb34b65a6e43b1f32791bb 100644 (file)
@@ -6,6 +6,7 @@ config XFS_FS
        select FS_IOMAP
        select FS_POSIX_ACL
        select LIBCRC32C
+       select QUOTACTL
        help
          XFS is a high performance journaling filesystem which originated
          on the SGI IRIX platform.  It is completely multi-threaded, can
@@ -75,24 +76,6 @@ config XFS_SUPPORT_ASCII_CI
          To continue supporting case-insensitivity (ascii-ci=1), say Y.
          To close off an attack surface, say N.
 
-config XFS_QUOTA
-       bool "XFS Quota support"
-       depends on XFS_FS
-       select QUOTACTL
-       help
-         If you say Y here, you will be able to set limits for disk usage on
-         a per user and/or a per group basis under XFS.  XFS considers quota
-         information as filesystem metadata and uses journaling to provide a
-         higher level guarantee of consistency.  The on-disk data format for
-         quota is also compatible with the IRIX version of XFS, allowing a
-         filesystem to be migrated between Linux and IRIX without any need
-         for conversion.
-
-         If unsure, say N.  More comprehensive documentation can be found in
-         README.quota in the xfsprogs package.  XFS quota can be used either
-         with or without the generic quota support enabled (CONFIG_QUOTA) -
-         they are completely independent subsystems.
-
 config XFS_DRAIN_INTENTS
        bool
        select JUMP_LABEL if HAVE_ARCH_JUMP_LABEL
index aaf78bbbf69247aec375a90907468a584ea3eb08..b7c6b7f9ce0e11b6ee76fce6267830947318a861 100644 (file)
@@ -68,6 +68,7 @@ xfs-y                         += xfs_acl.o \
                                   xfs_dahash_test.o \
                                   xfs_dir2_readdir.o \
                                   xfs_discard.o \
+                                  xfs_dquot.o \
                                   xfs_error.o \
                                   xfs_exchrange.o \
                                   xfs_export.o \
@@ -90,6 +91,10 @@ xfs-y                                += xfs_acl.o \
                                   xfs_mount.o \
                                   xfs_mru_cache.o \
                                   xfs_pwork.o \
+                                  xfs_qm.o \
+                                  xfs_qm_bhv.o \
+                                  xfs_qm_syscalls.o \
+                                  xfs_quotaops.o \
                                   xfs_reflink.o \
                                   xfs_rtalloc.o \
                                   xfs_stats.o \
@@ -109,6 +114,7 @@ xfs-y                               += xfs_log.o \
                                   xfs_exchmaps_item.o \
                                   xfs_extfree_item.o \
                                   xfs_attr_item.o \
+                                  xfs_dquot_item.o \
                                   xfs_icreate_item.o \
                                   xfs_inode_item.o \
                                   xfs_inode_item_recover.o \
@@ -117,16 +123,8 @@ xfs-y                              += xfs_log.o \
                                   xfs_rmap_item.o \
                                   xfs_log_recover.o \
                                   xfs_trans_ail.o \
-                                  xfs_trans_buf.o
-
-# optional features
-xfs-$(CONFIG_XFS_QUOTA)                += xfs_dquot.o \
-                                  xfs_dquot_item.o \
-                                  xfs_trans_dquot.o \
-                                  xfs_qm_syscalls.o \
-                                  xfs_qm_bhv.o \
-                                  xfs_qm.o \
-                                  xfs_quotaops.o
+                                  xfs_trans_buf.o \
+                                  xfs_trans_dquot.o
 
 xfs-$(CONFIG_SYSCTL)           += xfs_sysctl.o
 xfs-$(CONFIG_COMPAT)           += xfs_ioctl32.o
@@ -160,6 +158,7 @@ xfs-y                               += $(addprefix scrub/, \
                                   dabtree.o \
                                   dir.o \
                                   dirtree.o \
+                                  dqiterate.o \
                                   fscounters.o \
                                   health.o \
                                   ialloc.o \
@@ -168,6 +167,8 @@ xfs-y                               += $(addprefix scrub/, \
                                   listxattr.o \
                                   nlinks.o \
                                   parent.o \
+                                  quota.o \
+                                  quotacheck.o \
                                   readdir.o \
                                   refcount.o \
                                   rmap.o \
@@ -182,12 +183,6 @@ xfs-y                              += $(addprefix scrub/, \
 
 xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
 
-xfs-$(CONFIG_XFS_QUOTA)                += $(addprefix scrub/, \
-                                  dqiterate.o \
-                                  quota.o \
-                                  quotacheck.o \
-                                  )
-
 # online repair
 ifeq ($(CONFIG_XFS_ONLINE_REPAIR),y)
 xfs-y                          += $(addprefix scrub/, \
@@ -206,6 +201,8 @@ xfs-y                               += $(addprefix scrub/, \
                                   nlinks_repair.o \
                                   orphanage.o \
                                   parent_repair.o \
+                                  quota_repair.o \
+                                  quotacheck_repair.o \
                                   rcbag_btree.o \
                                   rcbag.o \
                                   reap.o \
@@ -218,9 +215,5 @@ xfs-y                               += $(addprefix scrub/, \
                                   tempfile.o \
                                   )
 
-xfs-$(CONFIG_XFS_QUOTA)                += $(addprefix scrub/, \
-                                  quota_repair.o \
-                                  quotacheck_repair.o \
-                                  )
 endif
 endif
index 2021396651de272820aaf3b2408506b751552b3d..f1d84838811ba195aa71b9c8e9c880657b15502b 100644 (file)
@@ -155,7 +155,6 @@ xfs_exchmaps_check_forks(
        return 0;
 }
 
-#ifdef CONFIG_XFS_QUOTA
 /* Log the actual updates to the quota accounting. */
 static inline void
 xfs_exchmaps_update_quota(
@@ -183,9 +182,6 @@ xfs_exchmaps_update_quota(
        xfs_trans_mod_dquot_byino(tp, xmi->xmi_ip1, qflag, ip1_delta);
        xfs_trans_mod_dquot_byino(tp, xmi->xmi_ip2, qflag, ip2_delta);
 }
-#else
-# define xfs_exchmaps_update_quota(tp, xmi, irec1, irec2)      ((void)0)
-#endif
 
 /* Decide if we want to skip this mapping from file1. */
 static inline bool
index 22f5f1a9d3f09b133524f1dc10deea4d91ea565b..b96a0c075edbffe12d1f75dab50020a60810557f 100644 (file)
@@ -250,7 +250,6 @@ xchk_block_set_corrupt(
        trace_xchk_block_error(sc, xfs_buf_daddr(bp), __return_address);
 }
 
-#ifdef CONFIG_XFS_QUOTA
 /* Record a corrupt quota counter. */
 void
 xchk_qcheck_set_corrupt(
@@ -261,7 +260,6 @@ xchk_qcheck_set_corrupt(
        sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
        trace_xchk_qcheck_error(sc, dqtype, id, __return_address);
 }
-#endif
 
 /* Record a corruption while cross-referencing. */
 void
@@ -867,7 +865,6 @@ again:
        return 0;
 }
 
-#ifdef CONFIG_XFS_QUOTA
 /*
  * Try to attach dquots to this inode if we think we might want to repair it.
  * Callers must not hold any ILOCKs.  If the dquots are broken and cannot be
@@ -885,7 +882,6 @@ xchk_ino_dqattach(
 
        return xrep_ino_dqattach(sc);
 }
-#endif
 
 /* Install an inode that we opened by handle for scrubbing. */
 int
index c676d315eeacc54a81089e91e9c3ab073bbb7a8b..3d4c4852a1eae1b0200cc596f7ebe43a74cbdb98 100644 (file)
@@ -30,10 +30,8 @@ void xchk_block_set_corrupt(struct xfs_scrub *sc,
 void xchk_ino_set_corrupt(struct xfs_scrub *sc, xfs_ino_t ino);
 void xchk_fblock_set_corrupt(struct xfs_scrub *sc, int whichfork,
                xfs_fileoff_t offset);
-#ifdef CONFIG_XFS_QUOTA
 void xchk_qcheck_set_corrupt(struct xfs_scrub *sc, unsigned int dqtype,
                xfs_dqid_t id);
-#endif
 
 void xchk_block_xref_set_corrupt(struct xfs_scrub *sc,
                struct xfs_buf *bp);
@@ -75,19 +73,9 @@ int xchk_setup_parent(struct xfs_scrub *sc);
 int xchk_setup_dirtree(struct xfs_scrub *sc);
 int xchk_setup_rtbitmap(struct xfs_scrub *sc);
 int xchk_setup_rtsummary(struct xfs_scrub *sc);
-#ifdef CONFIG_XFS_QUOTA
 int xchk_ino_dqattach(struct xfs_scrub *sc);
 int xchk_setup_quota(struct xfs_scrub *sc);
 int xchk_setup_quotacheck(struct xfs_scrub *sc);
-#else
-static inline int
-xchk_ino_dqattach(struct xfs_scrub *sc)
-{
-       return 0;
-}
-# define xchk_setup_quota              xchk_setup_nothing
-# define xchk_setup_quotacheck         xchk_setup_nothing
-#endif
 int xchk_setup_fscounters(struct xfs_scrub *sc);
 int xchk_setup_nlinks(struct xfs_scrub *sc);
 
index 67478294f11ae8616195f259a841cdede1f5d2f9..23d88e7158b326e6072f77f72c4c222c634b65ac 100644 (file)
@@ -693,7 +693,6 @@ xrep_find_ag_btree_roots(
        return error;
 }
 
-#ifdef CONFIG_XFS_QUOTA
 /* Update some quota flags in the superblock. */
 void
 xrep_update_qflags(
@@ -790,7 +789,6 @@ xrep_ino_dqattach(
 
        return error;
 }
-#endif /* CONFIG_XFS_QUOTA */
 
 /*
  * Ensure that the inode being repaired is ready to handle a certain number of
index f421e04ae3154b0b3a8c567c50d6cfdf4bb6e032..026984aab4b3c67c251825c5a084519e23ac1ad3 100644 (file)
@@ -71,15 +71,10 @@ struct xrep_find_ag_btree {
 int xrep_find_ag_btree_roots(struct xfs_scrub *sc, struct xfs_buf *agf_bp,
                struct xrep_find_ag_btree *btree_info, struct xfs_buf *agfl_bp);
 
-#ifdef CONFIG_XFS_QUOTA
 void xrep_update_qflags(struct xfs_scrub *sc, unsigned int clear_flags,
                unsigned int set_flags);
 void xrep_force_quotacheck(struct xfs_scrub *sc, xfs_dqtype_t type);
 int xrep_ino_dqattach(struct xfs_scrub *sc);
-#else
-# define xrep_force_quotacheck(sc, type)       ((void)0)
-# define xrep_ino_dqattach(sc)                 (0)
-#endif /* CONFIG_XFS_QUOTA */
 
 int xrep_setup_xfbtree(struct xfs_scrub *sc, const char *descr);
 
@@ -136,14 +131,8 @@ int xrep_symlink(struct xfs_scrub *sc);
 int xrep_dirtree(struct xfs_scrub *sc);
 int xrep_rtbitmap(struct xfs_scrub *sc);
 int xrep_rtsummary(struct xfs_scrub *sc);
-
-#ifdef CONFIG_XFS_QUOTA
 int xrep_quota(struct xfs_scrub *sc);
 int xrep_quotacheck(struct xfs_scrub *sc);
-#else
-# define xrep_quota                    xrep_notsupported
-# define xrep_quotacheck               xrep_notsupported
-#endif /* CONFIG_XFS_QUOTA */
 
 int xrep_reinit_pagf(struct xfs_scrub *sc);
 int xrep_reinit_pagi(struct xfs_scrub *sc);
index 9eb6ec84fa589d8f72461d4f0bc8b914243cd4dd..df68d71cc0b0fa3ae8227ed1126454516ef42291 100644 (file)
@@ -257,13 +257,8 @@ int xchk_parent(struct xfs_scrub *sc);
 int xchk_dirtree(struct xfs_scrub *sc);
 int xchk_rtbitmap(struct xfs_scrub *sc);
 int xchk_rtsummary(struct xfs_scrub *sc);
-#ifdef CONFIG_XFS_QUOTA
 int xchk_quota(struct xfs_scrub *sc);
 int xchk_quotacheck(struct xfs_scrub *sc);
-#else
-# define xchk_quota            xchk_nothing
-# define xchk_quotacheck       xchk_nothing
-#endif
 int xchk_fscounters(struct xfs_scrub *sc);
 int xchk_nlinks(struct xfs_scrub *sc);
 
index fde249c69d372a1c946eaccb8cac7a19327f017e..0b0a2021029b24028d92bfc81c25de299a19e849 100644 (file)
@@ -451,7 +451,6 @@ DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_error);
 DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning);
 DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_preen);
 
-#ifdef CONFIG_XFS_QUOTA
 DECLARE_EVENT_CLASS(xchk_dqiter_class,
        TP_PROTO(struct xchk_dqiter *cursor, uint64_t id),
        TP_ARGS(cursor, id),
@@ -520,7 +519,6 @@ TRACE_EVENT(xchk_qcheck_error,
                  __entry->id,
                  __entry->ret_ip)
 );
-#endif /* CONFIG_XFS_QUOTA */
 
 TRACE_EVENT(xchk_incomplete,
        TP_PROTO(struct xfs_scrub *sc, void *ret_ip),
@@ -2616,7 +2614,6 @@ TRACE_EVENT(xrep_cow_free_staging,
                  __entry->blockcount)
 );
 
-#ifdef CONFIG_XFS_QUOTA
 DECLARE_EVENT_CLASS(xrep_dquot_class,
        TP_PROTO(struct xfs_mount *mp, uint8_t type, uint32_t id),
        TP_ARGS(mp, type, id),
@@ -2644,7 +2641,6 @@ DEFINE_XREP_DQUOT_EVENT(xrep_dquot_item);
 DEFINE_XREP_DQUOT_EVENT(xrep_disk_dquot);
 DEFINE_XREP_DQUOT_EVENT(xrep_dquot_item_fill_bmap_hole);
 DEFINE_XREP_DQUOT_EVENT(xrep_quotacheck_dquot);
-#endif /* CONFIG_XFS_QUOTA */
 
 DEFINE_SCRUB_NLINKS_DIFF_EVENT(xrep_nlinks_update_inode);
 DEFINE_SCRUB_NLINKS_DIFF_EVENT(xrep_nlinks_unfixable_inode);
index 4d8a6aece995d9a103b85c07fb5b1d0727f240e4..b732723235570c7a3a1ce5ba30eb28214dd2524a 100644 (file)
@@ -55,17 +55,8 @@ void xfs_buf_item_log(struct xfs_buf_log_item *, uint, uint);
 bool   xfs_buf_item_dirty_format(struct xfs_buf_log_item *);
 void   xfs_buf_inode_iodone(struct xfs_buf *);
 void   xfs_buf_inode_io_fail(struct xfs_buf *bp);
-#ifdef CONFIG_XFS_QUOTA
 void   xfs_buf_dquot_iodone(struct xfs_buf *);
 void   xfs_buf_dquot_io_fail(struct xfs_buf *bp);
-#else
-static inline void xfs_buf_dquot_iodone(struct xfs_buf *bp)
-{
-}
-static inline void xfs_buf_dquot_io_fail(struct xfs_buf *bp)
-{
-}
-#endif /* CONFIG_XFS_QUOTA */
 void   xfs_buf_iodone(struct xfs_buf *);
 bool   xfs_buf_log_check_iovec(struct xfs_log_iovec *iovec);
 
index ef39343a1da4bd2680cf7030a2c66d4b2a069f78..7cd819c7b2b5dc78c17acdd94167947912f047ec 100644 (file)
@@ -292,17 +292,11 @@ xlog_recover_validate_buf_type(
        case XFS_BLFT_UDQUOT_BUF:
        case XFS_BLFT_PDQUOT_BUF:
        case XFS_BLFT_GDQUOT_BUF:
-#ifdef CONFIG_XFS_QUOTA
                if (magic16 != XFS_DQUOT_MAGIC) {
                        warnmsg = "Bad DQUOT block magic!";
                        break;
                }
                bp->b_ops = &xfs_dquot_buf_ops;
-#else
-               xfs_alert(mp,
-       "Trying to recover dquots without QUOTA support built in!");
-               ASSERT(0);
-#endif
                break;
        case XFS_BLFT_DINO_BUF:
                if (magic16 != XFS_DINODE_MAGIC) {
index 96496f39f551ae29ed10ce4c0f9107287bc69e2a..e85af4c087ea23542749aacece76569d7721db4f 100644 (file)
@@ -467,11 +467,7 @@ __XFS_IS_OPSTATE(inode32, INODE32)
 __XFS_IS_OPSTATE(readonly, READONLY)
 __XFS_IS_OPSTATE(inodegc_enabled, INODEGC_ENABLED)
 __XFS_IS_OPSTATE(blockgc_enabled, BLOCKGC_ENABLED)
-#ifdef CONFIG_XFS_QUOTA
 __XFS_IS_OPSTATE(quotacheck_running, QUOTACHECK_RUNNING)
-#else
-# define xfs_is_quotacheck_running(mp) (false)
-#endif
 __XFS_IS_OPSTATE(done_with_log_incompat, UNSET_LOG_INCOMPAT)
 __XFS_IS_OPSTATE(using_logged_xattrs, USE_LARP)
 
index 23d71a55bbc0062f2fbf6472f67618b60d1e2196..a1dad4adaed56d850b8b32d95bf8d912e7b234a8 100644 (file)
@@ -90,7 +90,6 @@ struct xfs_apply_dqtrx_params {
        xfs_dqid_t              q_id;
 };
 
-#ifdef CONFIG_XFS_QUOTA
 extern void xfs_trans_dup_dqinfo(struct xfs_trans *, struct xfs_trans *);
 extern void xfs_trans_free_dqinfo(struct xfs_trans *);
 extern void xfs_trans_mod_dquot_byino(struct xfs_trans *, struct xfs_inode *,
@@ -125,7 +124,7 @@ extern void xfs_qm_unmount(struct xfs_mount *);
 extern void xfs_qm_unmount_quotas(struct xfs_mount *);
 bool xfs_inode_near_dquot_enforcement(struct xfs_inode *ip, xfs_dqtype_t type);
 
-# ifdef CONFIG_XFS_LIVE_HOOKS
+#ifdef CONFIG_XFS_LIVE_HOOKS
 void xfs_trans_mod_ino_dquot(struct xfs_trans *tp, struct xfs_inode *ip,
                struct xfs_dquot *dqp, unsigned int field, int64_t delta);
 
@@ -143,71 +142,10 @@ int xfs_dqtrx_hook_add(struct xfs_quotainfo *qi, struct xfs_dqtrx_hook *hook);
 void xfs_dqtrx_hook_del(struct xfs_quotainfo *qi, struct xfs_dqtrx_hook *hook);
 void xfs_dqtrx_hook_setup(struct xfs_dqtrx_hook *hook, notifier_fn_t mod_fn,
                notifier_fn_t apply_fn);
-# else
-#  define xfs_trans_mod_ino_dquot(tp, ip, dqp, field, delta) \
-               xfs_trans_mod_dquot((tp), (dqp), (field), (delta))
-# endif /* CONFIG_XFS_LIVE_HOOKS */
-
 #else
-static inline int
-xfs_qm_vop_dqalloc(struct xfs_inode *ip, kuid_t kuid, kgid_t kgid,
-               prid_t prid, uint flags, struct xfs_dquot **udqp,
-               struct xfs_dquot **gdqp, struct xfs_dquot **pdqp)
-{
-       *udqp = NULL;
-       *gdqp = NULL;
-       *pdqp = NULL;
-       return 0;
-}
-#define xfs_trans_dup_dqinfo(tp, tp2)
-#define xfs_trans_free_dqinfo(tp)
-static inline void xfs_trans_mod_dquot_byino(struct xfs_trans *tp,
-               struct xfs_inode *ip, uint field, int64_t delta)
-{
-}
-#define xfs_trans_apply_dquot_deltas(tp)
-#define xfs_trans_unreserve_and_mod_dquots(tp)
-static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
-               struct xfs_inode *ip, int64_t dblocks, int64_t rblocks,
-               bool force)
-{
-       return 0;
-}
-static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
-               struct xfs_mount *mp, struct xfs_dquot *udqp,
-               struct xfs_dquot *gdqp, struct xfs_dquot *pdqp,
-               int64_t nblks, long nions, uint flags)
-{
-       return 0;
-}
-
-static inline int
-xfs_trans_reserve_quota_icreate(struct xfs_trans *tp, struct xfs_dquot *udqp,
-               struct xfs_dquot *gdqp, struct xfs_dquot *pdqp, int64_t dblocks)
-{
-       return 0;
-}
-
-#define xfs_qm_vop_create_dqattach(tp, ip, u, g, p)
-#define xfs_qm_vop_rename_dqattach(it)                                 (0)
-#define xfs_qm_vop_chown(tp, ip, old, new)                             (NULL)
-#define xfs_qm_dqattach(ip)                                            (0)
-#define xfs_qm_dqattach_locked(ip, fl)                                 (0)
-#define xfs_qm_dqdetach(ip)
-#define xfs_qm_dqrele(d)                       do { (d) = (d); } while(0)
-#define xfs_qm_statvfs(ip, s)                  do { } while(0)
-#define xfs_qm_newmount(mp, a, b)                                      (0)
-#define xfs_qm_mount_quotas(mp)
-#define xfs_qm_unmount(mp)
-#define xfs_qm_unmount_quotas(mp)
-#define xfs_inode_near_dquot_enforcement(ip, type)                     (false)
-
-# ifdef CONFIG_XFS_LIVE_HOOKS
-#  define xfs_dqtrx_hook_enable()              ((void)0)
-#  define xfs_dqtrx_hook_disable()             ((void)0)
-# endif /* CONFIG_XFS_LIVE_HOOKS */
-
-#endif /* CONFIG_XFS_QUOTA */
+# define xfs_trans_mod_ino_dquot(tp, ip, dqp, field, delta) \
+               xfs_trans_mod_dquot((tp), (dqp), (field), (delta))
+#endif /* CONFIG_XFS_LIVE_HOOKS */
 
 static inline int
 xfs_quota_reserve_blkres(struct xfs_inode *ip, int64_t blocks)
index ed97d72caa665295a5e17d223615373c69cdea3b..933196245d84392f15eff6ef26f89e9bea8e645c 100644 (file)
@@ -108,7 +108,6 @@ void xfs_stats_clearall(struct xfsstats __percpu *stats)
 
 #ifdef CONFIG_PROC_FS
 /* legacy quota interfaces */
-#ifdef CONFIG_XFS_QUOTA
 
 #define XFSSTAT_START_XQMSTAT xfsstats_offset(xs_qm_dqreclaims)
 #define XFSSTAT_END_XQMSTAT xfsstats_offset(xs_qm_dquot)
@@ -133,7 +132,6 @@ static int xqmstat_proc_show(struct seq_file *m, void *v)
        seq_putc(m, '\n');
        return 0;
 }
-#endif /* CONFIG_XFS_QUOTA */
 
 int
 xfs_init_procfs(void)
@@ -145,12 +143,10 @@ xfs_init_procfs(void)
                          "/sys/fs/xfs/stats/stats"))
                goto out;
 
-#ifdef CONFIG_XFS_QUOTA
        if (!proc_create_single("fs/xfs/xqmstat", 0, NULL, xqmstat_proc_show))
                goto out;
        if (!proc_create_single("fs/xfs/xqm", 0, NULL, xqm_proc_show))
                goto out;
-#endif
        return 0;
 
 out:
index 7d22ce015ee1e6001b953133ab8d645e175068d5..2c201ca944ca53e86b117d7e25678a6174b1fa2b 100644 (file)
@@ -1430,11 +1430,6 @@ xfs_fs_validate_params(
                return -EINVAL;
        }
 
-       if (!IS_ENABLED(CONFIG_XFS_QUOTA) && mp->m_qflags != 0) {
-               xfs_warn(mp, "quota support not available in this kernel.");
-               return -EINVAL;
-       }
-
        if ((mp->m_dalign && !mp->m_swidth) ||
            (!mp->m_dalign && mp->m_swidth)) {
                xfs_warn(mp, "sunit and swidth must be specified together");
@@ -1524,10 +1519,8 @@ xfs_fs_fill_super(
        sb_min_blocksize(sb, BBSIZE);
        sb->s_xattr = xfs_xattr_handlers;
        sb->s_export_op = &xfs_export_operations;
-#ifdef CONFIG_XFS_QUOTA
        sb->s_qcop = &xfs_quotactl_operations;
        sb->s_quota_types = QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ;
-#endif
        sb->s_op = &xfs_super_operations;
 
        /*
index 1801be69ed9b9244ee5688bfb60c41c019500cc6..8323af925f77a49e59e919c7eac8b8f77caa1492 100644 (file)
@@ -8,15 +8,9 @@
 
 #include <linux/exportfs.h>
 
-#ifdef CONFIG_XFS_QUOTA
 extern int xfs_qm_init(void);
 extern void xfs_qm_exit(void);
-# define XFS_QUOTA_STRING      "quota, "
-#else
-# define xfs_qm_init() (0)
-# define xfs_qm_exit() do { } while (0)
-# define XFS_QUOTA_STRING
-#endif
+#define XFS_QUOTA_STRING       "quota, "
 
 #define XFS_ACL_STRING         "ACLs, "