Skip to content

Commit

Permalink
linux: module: weld all but spl.ko into zfs.ko
Browse files Browse the repository at this point in the history
Originally it was thought it would be useful to split up the kmods
by functionality.  This would allow external consumers to only load
what was needed.  However, in practice we've never had a case where
this functionality would be needed, and conversely managing multiple
kmods can be awkward.  Therefore, this change merges all but the
spl.ko kmod in to a single zfs.ko kmod.

Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13274
  • Loading branch information
nabijaczleweli authored and behlendorf committed Apr 20, 2022
1 parent 310ab9d commit ad9e767
Show file tree
Hide file tree
Showing 40 changed files with 518 additions and 749 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ vcscheck:

PHONY += zstdcheck
zstdcheck:
@$(MAKE) -C module/zstd checksymbols
@$(MAKE) -C module check-zstd-symbols

PHONY += lint
lint: cppcheck paxcheck
Expand Down
11 changes: 0 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,6 @@ AC_CONFIG_FILES([
man/Makefile
module/Kbuild
module/Makefile
module/avl/Makefile
module/icp/Makefile
module/lua/Makefile
module/nvpair/Makefile
module/os/linux/spl/Makefile
module/os/linux/zfs/Makefile
module/spl/Makefile
module/unicode/Makefile
module/zcommon/Makefile
module/zfs/Makefile
module/zstd/Makefile
rpm/Makefile
rpm/generic/Makefile
rpm/generic/zfs-dkms.spec
Expand Down
3 changes: 1 addition & 2 deletions etc/init.d/zfs-zed.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ do_stop()
then
# No pools imported, it is/should be safe/possible to
# unload modules.
zfs_action "Unloading modules" rmmod zfs zunicode \
zavl zcommon znvpair zlua spl
zfs_action "Unloading modules" rmmod zfs spl
return "$?"
fi
}
Expand Down
3 changes: 0 additions & 3 deletions include/os/freebsd/spl/sys/ccompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ extern "C" {
#endif

#define EXPORT_SYMBOL(x)
#define MODULE_AUTHOR(s)
#define MODULE_DESCRIPTION(s)
#define MODULE_LICENSE(s)
#define module_param(a, b, c)
#define module_param_call(a, b, c, d, e)
#define module_param_named(a, b, c, d)
Expand Down
5 changes: 0 additions & 5 deletions include/os/freebsd/spl/sys/mod_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@

#include <sys/sysctl.h>

#define ZFS_MODULE_DESCRIPTION(s)
#define ZFS_MODULE_AUTHOR(s)
#define ZFS_MODULE_LICENSE(s)
#define ZFS_MODULE_VERSION(s)

#define EXPORT_SYMBOL(x)
#define module_param(a, b, c)
#define MODULE_PARM_DESC(a, b)
Expand Down
7 changes: 0 additions & 7 deletions include/os/linux/kernel/linux/mod_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,4 @@ enum scope_prefix_types {

#define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp

#define ZFS_MODULE_DESCRIPTION(s) MODULE_DESCRIPTION(s)
#define ZFS_MODULE_AUTHOR(s) MODULE_AUTHOR(s)
#define ZFS_MODULE_LICENSE(s) MODULE_LICENSE(s)
#define ZFS_MODULE_VERSION(s) MODULE_VERSION(s)

#define module_init_early(fn) module_init(fn)

#endif /* _MOD_COMPAT_H */
5 changes: 0 additions & 5 deletions include/sys/mod.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
* Exported symbols
*/
#define EXPORT_SYMBOL(x)

#define ZFS_MODULE_DESCRIPTION(s)
#define ZFS_MODULE_AUTHOR(s)
#define ZFS_MODULE_LICENSE(s)
#define ZFS_MODULE_VERSION(s)
#endif

#endif /* SYS_MOD_H */
Loading

0 comments on commit ad9e767

Please sign in to comment.