Skip to contentSkip to conversation

linux-next: build failure after merge of the vfs-brauner tree

PATCH Stephen Rothwell 3 participants 4 messages Mar 17, 2025 – Mar 18, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the vfs-brauner tree, today's linux-next build (x86_64 allmodconfig) failed like this:

fs/orangefs/orangefs-debugfs.c:101:8: error: redefinition of 'struct __keyword_mask_s'

  101 | struct __keyword_mask_s {
      |        ^~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:48:8: note: originally defined here
   48 | struct __keyword_mask_s {
      |        ^~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:119:32: error: conflicting types for 's_kmod_keyword_mask_map'; have 'struct __keyword_mask_s[]'
  119 | static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:66:32: note: previous definition of 's_kmod_keyword_mask_map' with type 'struct __keyword_mask_s[18]'
   66 | static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:140:18: error: redefinition of 'num_kmod_keyword_mask_map'
  140 | static const int num_kmod_keyword_mask_map = (int)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:87:18: note: previous definition of 'num_kmod_keyword_mask_map' with type 'int'
   87 | static const int num_kmod_keyword_mask_map = (int)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

50fb0a7f43c0 ("orangefs: Move s_kmod_keyword_mask_map to orangefs-debugfs.c")

merging badly with commit

063f8013373a ("orangefs: move s_kmod_keyword_mask_map[] into debugfs.c")

from the orangefs tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Tue, 18 Mar 2025 09:43:37 +1100
Subject: [PATCH] fix up for bad merge of "orangefs: Move
s_kmod_keyword_mask_map to orangefs-debugfs.c"

with "orangefs: move s_kmod_keyword_mask_map[] into debugfs.c" from the oragngefs tree.

---
 fs/orangefs/orangefs-debugfs.c | 43 ----------------------------------
 1 file changed, 43 deletions(-)
fs/orangefs/orangefs-debugfs.c +0 -43
index 98b52ceaf011..f7095c91660c 100644
@@ -97,49 +97,6 @@ static const int num_kmod_keyword_mask_map = (int)
 #define ORANGEFS_VERBOSE "verbose"
 #define ORANGEFS_ALL "all"
 
-/* a private internal type */
-struct __keyword_mask_s {
-	const char *keyword;
-	__u64 mask_val;
-};
-
-/*
- * Map all kmod keywords to kmod debug masks here. Keep this
- * structure "packed":
- *
- *   "all" is always last...
- *
- *   keyword     mask_val     index
- *     foo          1           0
- *     bar          2           1
- *     baz          4           2
- *     qux          8           3
- *      .           .           .
- */
-static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
-	{"super", GOSSIP_SUPER_DEBUG},
-	{"inode", GOSSIP_INODE_DEBUG},
-	{"file", GOSSIP_FILE_DEBUG},
-	{"dir", GOSSIP_DIR_DEBUG},
-	{"utils", GOSSIP_UTILS_DEBUG},
-	{"wait", GOSSIP_WAIT_DEBUG},
-	{"acl", GOSSIP_ACL_DEBUG},
-	{"dcache", GOSSIP_DCACHE_DEBUG},
-	{"dev", GOSSIP_DEV_DEBUG},
-	{"name", GOSSIP_NAME_DEBUG},
-	{"bufmap", GOSSIP_BUFMAP_DEBUG},
-	{"cache", GOSSIP_CACHE_DEBUG},
-	{"debugfs", GOSSIP_DEBUGFS_DEBUG},
-	{"xattr", GOSSIP_XATTR_DEBUG},
-	{"init", GOSSIP_INIT_DEBUG},
-	{"sysfs", GOSSIP_SYSFS_DEBUG},
-	{"none", GOSSIP_NO_DEBUG},
-	{"all", GOSSIP_MAX_DEBUG}
-};
-
-static const int num_kmod_keyword_mask_map = (int)
-	(ARRAY_SIZE(s_kmod_keyword_mask_map));
-
 /*
  * An array of client_debug_mask will be built to hold debug keyword/mask
  * values fetched from userspace.
Signature · 5 lines
2.45.2

-- 
Cheers,
Stephen Rothwell
maintainer
#1 lore raw

Hi Stephen... is there something I should do differently? I might be using an older
version of the patch, it was sent to me around three weeks ago.

Quoted 2 lines
Quoted 2 lines

Caused by commit
50fb0a7f43c0 ("orangefs: Move s_kmod_keyword_mask_map to

orangefs-debugfs.c")

Quoted 2 lines
Quoted 2 lines

merging badly with commit
063f8013373a ("orangefs: move s_kmod_keyword_mask_map[] into debugfs.c")

One has "Move" the one I'm using has "move", as if the author (Arnd) made an update
to the patch and maybe I missed it...?

-Mike

Quoted 110 lines · Stephen Rothwell

Hi all,

After merging the vfs-brauner tree, today's linux-next build (x86_64 allmodconfig) failed like this:

fs/orangefs/orangefs-debugfs.c:101:8: error: redefinition of 'struct __keyword_mask_s'

  101 | struct __keyword_mask_s {
      |        ^~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:48:8: note: originally defined here
   48 | struct __keyword_mask_s {
      |        ^~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:119:32: error: conflicting types for 's_kmod_keyword_mask_map'; have 'struct __keyword_mask_s[]'
  119 | static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:66:32: note: previous definition of 's_kmod_keyword_mask_map' with type 'struct __keyword_mask_s[18]'
   66 | static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
      |                                ^~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:140:18: error: redefinition of 'num_kmod_keyword_mask_map'
  140 | static const int num_kmod_keyword_mask_map = (int)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/orangefs/orangefs-debugfs.c:87:18: note: previous definition of 'num_kmod_keyword_mask_map' with type 'int'
   87 | static const int num_kmod_keyword_mask_map = (int)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

50fb0a7f43c0 ("orangefs: Move s_kmod_keyword_mask_map to orangefs-debugfs.c")

merging badly with commit

063f8013373a ("orangefs: move s_kmod_keyword_mask_map[] into debugfs.c")

from the orangefs tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Tue, 18 Mar 2025 09:43:37 +1100
Subject: [PATCH] fix up for bad merge of "orangefs: Move
s_kmod_keyword_mask_map to orangefs-debugfs.c"

with "orangefs: move s_kmod_keyword_mask_map[] into debugfs.c" from the oragngefs tree.

---
 fs/orangefs/orangefs-debugfs.c | 43 ----------------------------------
 1 file changed, 43 deletions(-)
fs/orangefs/orangefs-debugfs.c +0 -44
index 98b52ceaf011..f7095c91660c 100644
@@ -97,49 +97,6 @@ static const int num_kmod_keyword_mask_map = (int)
 #define ORANGEFS_VERBOSE "verbose"
 #define ORANGEFS_ALL "all"
 
-/* a private internal type */
-struct __keyword_mask_s {
-       const char *keyword;
-       __u64 mask_val;
-};
-
-/*
- * Map all kmod keywords to kmod debug masks here. Keep this
- * structure "packed":
- *
- *   "all" is always last...
- *
- *   keyword     mask_val     index
- *     foo          1           0
- *     bar          2           1
- *     baz          4           2
- *     qux          8           3
- *      .           .           .
- */
-static struct __keyword_mask_s s_kmod_keyword_mask_map[] = {
-       {"super", GOSSIP_SUPER_DEBUG},
-       {"inode", GOSSIP_INODE_DEBUG},
-       {"file", GOSSIP_FILE_DEBUG},
-       {"dir", GOSSIP_DIR_DEBUG},
-       {"utils", GOSSIP_UTILS_DEBUG},
-       {"wait", GOSSIP_WAIT_DEBUG},
-       {"acl", GOSSIP_ACL_DEBUG},
-       {"dcache", GOSSIP_DCACHE_DEBUG},
-       {"dev", GOSSIP_DEV_DEBUG},
-       {"name", GOSSIP_NAME_DEBUG},
-       {"bufmap", GOSSIP_BUFMAP_DEBUG},
-       {"cache", GOSSIP_CACHE_DEBUG},
-       {"debugfs", GOSSIP_DEBUGFS_DEBUG},
-       {"xattr", GOSSIP_XATTR_DEBUG},
-       {"init", GOSSIP_INIT_DEBUG},
-       {"sysfs", GOSSIP_SYSFS_DEBUG},
-       {"none", GOSSIP_NO_DEBUG},
-       {"all", GOSSIP_MAX_DEBUG}
-};
-
-static const int num_kmod_keyword_mask_map = (int)
-       (ARRAY_SIZE(s_kmod_keyword_mask_map));
-
 /*
  * An array of client_debug_mask will be built to hold debug keyword/mask
  * values fetched from userspace.
--

2.45.2

--
Cheers,
Stephen Rothwell

#2 lore raw
Quoted 6 lines · Mike Marshall

Hi Stephen... is there something I should do differently? I might be using an older
version of the patch, it was sent to me around three weeks ago.

Quoted 2 lines
Quoted 2 lines

Caused by commit
50fb0a7f43c0 ("orangefs: Move s_kmod_keyword_mask_map to

Quoted 7 lines

orangefs-debugfs.c")

Quoted 2 lines
Quoted 2 lines

merging badly with commit
063f8013373a ("orangefs: move s_kmod_keyword_mask_map[] into debugfs.c")

One has "Move" the one I'm using has "move", as if the author (Arnd) made an update
to the patch and maybe I missed it...?

The earlier patch was from Matthew Wilcox. Our two patches are almost identical (they add the same data in different parts of the file) but sent independently, and the problem was that both got applied instead of just one. I think the easiest fix would be if you just drop my patch from your tree.

Arnd

maintainer
#3 lore raw

Arnd... thanks, I'll get 'er done...

-Mike

Quoted 23 lines · Arnd Bergmann
Quoted 6 lines · Mike Marshall

Hi Stephen... is there something I should do differently? I might be using an older
version of the patch, it was sent to me around three weeks ago.

Quoted 2 lines
Quoted 2 lines

Caused by commit
50fb0a7f43c0 ("orangefs: Move s_kmod_keyword_mask_map to

Quoted 7 lines

orangefs-debugfs.c")

Quoted 2 lines
Quoted 2 lines

merging badly with commit
063f8013373a ("orangefs: move s_kmod_keyword_mask_map[] into debugfs.c")

One has "Move" the one I'm using has "move", as if the author (Arnd) made an update
to the patch and maybe I missed it...?

The earlier patch was from Matthew Wilcox. Our two patches are almost identical (they add the same data in different parts of the file) but sent independently, and the problem was that both got applied instead of just one. I think the easiest fix would be if you just drop my patch from your tree.

Arnd