Hi,
On Mon, May 26, 2025 at 6:40?AM Wang Yugui wangyugui@e16-tech.com wrote:
Hi, Cc: Filipe Manana
I noticed 6.1.140 build failure(fs/btrfs/discard.c:247:5: error: implicit declaration of function 'ASSERT')
fs/btrfs/discard.c: In function 'peek_discard_list': fs/btrfs/discard.c:247:5: error: implicit declaration of function 'ASSERT'; did you mean 'IS_ERR'? [-Werror=implicit-function-declaration] ASSERT(block_group->discard_index != ^~~~~~ IS_ERR
It seems realted to the patch(btrfs-fix-discard-worker-infinite-loop-after-disabling-discard.patch).
Yes, it is.
The patch, like most stable backports, was automatically picked by the stable scripts and added to stable releases. I assume that before the release was made, it was compile tested by the stable automatic processes.
I just tried it, and it compiles successfully for me:
fdmanana 11:56:26 ~/git/hub/linux ((v6.12))> git clean -xfd fdmanana 11:57:27 ~/git/hub/linux ((v6.12))> git co v6.1.140 fdmanana 11:59:53 ~/git/hub/linux ((v6.1.140))> make defconfig
fdmanana 12:02:17 ~/git/hub/linux ((v6.1.140))> grep BTRFS .config CONFIG_BTRFS_FS=m CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_BTRFS_FS_CHECK_INTEGRITY=y CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y CONFIG_BTRFS_DEBUG=y CONFIG_BTRFS_ASSERT=y CONFIG_BTRFS_FS_REF_VERIFY=y
fdmanana 12:06:08 ~/git/hub/linux ((v6.1.140))> make fs/btrfs/btrfs.ko LD [M] fs/btrfs/btrfs.ko
fdmanana 12:11:12 ~/git/hub/linux ((v6.1.140))> gcc --version gcc (Debian 9.3.0-18) 9.3.0
Yes. this build error does NOT happen on 6.1.140 upstream.
It happened here because of some local btrfs backuport of linux 6.2.
Sorry.
Best Regards Wang Yugui (wangyugui@e16-tech.com) 2025/05/31
I walked around it with the following patch.
In the future please cc the stable list when you find problems with stable backports.
diff --git a/fs/btrfs/discard.c b/fs/btrfs/discard.c index 98bce18..9ffe5c4 100644 --- a/fs/btrfs/discard.c +++ b/fs/btrfs/discard.c @@ -7,6 +7,7 @@ #include <linux/math64.h> #include <linux/sizes.h> #include <linux/workqueue.h> +#include "messages.h" #include "ctree.h" #include "block-group.h" #include "discard.h"
Best Regards Wang Yugui (wangyugui@e16-tech.com) 2025/05/26