From 78e9e987e1c2bd0beeabd5f44abbe25cebf3a219 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 5 May 2024 14:04:57 +1000 Subject: [PATCH] linux: log a scary warning when used with an experimental kernel Since the person using the kernel may not be the person who built it, show a warning at module load too, in case they aren't aware that it might be weird. Reviewed-by: Robert Evans Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Signed-off-by: Rob Norris Sponsored-by: https://despairlabs.com/sponsor/ Closes #15986 --- module/os/linux/zfs/zfs_ioctl_os.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/module/os/linux/zfs/zfs_ioctl_os.c b/module/os/linux/zfs/zfs_ioctl_os.c index 663474ea49ab..502d173b70f9 100644 --- a/module/os/linux/zfs/zfs_ioctl_os.c +++ b/module/os/linux/zfs/zfs_ioctl_os.c @@ -303,6 +303,12 @@ openzfs_init_os(void) "ZFS pool version %s, ZFS filesystem version %s\n", ZFS_META_VERSION, ZFS_META_RELEASE, ZFS_DEBUG_STR, SPA_VERSION_STRING, ZPL_VERSION_STRING); +#ifdef HAVE_LINUX_EXPERIMENTAL + printk(KERN_NOTICE "ZFS: Using ZFS with kernel %s is EXPERIMENTAL and " + "SERIOUS DATA LOSS may occur!\n", utsname()->release); + printk(KERN_NOTICE "ZFS: Please report your results at: " + "https://github.com/openzfs/zfs/issues/new\n"); +#endif #ifndef CONFIG_FS_POSIX_ACL printk(KERN_NOTICE "ZFS: Posix ACLs disabled by kernel\n"); #endif /* CONFIG_FS_POSIX_ACL */