linux-next: build failure after merge of the bcachefs tree
Hi all,
After merging the bcachefs tree, today's linux-next build (x86_64 allmodconfig) failed like this:
fs/bcachefs/time_stats.c: In function 'bch2_time_stats_reset':fs/bcachefs/time_stats.c:165:27: error: comparison of pointers to disjoint address spaces
165 | stats->buffer != TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_exit':fs/bcachefs/time_stats.c:175:27: error: comparison of pointers to disjoint address spaces
175 | if (stats->buffer != TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':fs/bcachefs/time_stats.c:192:23: error: assignment from pointer to non-enclosed address space
192 | stats->buffer = TIME_STATS_NONPCPU;
| ^fs/bcachefs/time_stats.c:192:23: note: expected '__seg_gs struct time_stat_buffer *' but pointer is of type 'struct time_stat_buffer *'
Caused by commit
5490554cf06f ("bcachefs: bch2_time_stats_init_no_pcpu()")
interacting with commit
6a367577153a ("percpu/x86: enable strict percpu checks via named AS qualifiers")
(or an associated one)
from the mm-stable tree.
I have applied the following merge fix patch for today (but I think it could just be applied to the bcachefs tree).
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Mar 2025 13:15:00 +1100
Subject: [PATCH] fix up for "bcachefs: bch2_time_stats_init_no_pcpu()"
interacting with "percpu/x86: enable strict percpu checks via named AS qualifiers"
--- fs/bcachefs/time_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/time_stats.c +1 -1
@@ -11,7 +11,7 @@#include "time_stats.h" /* disable automatic switching to percpu mode */ -#define TIME_STATS_NONPCPU ((struct time_stat_buffer *) 1) +#define TIME_STATS_NONPCPU ((struct time_stat_buffer __percpu *) 1)static const struct time_unit time_units[] = { {"ns" ,1 },
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Hi all,
Quoted 58 lines · On Wed, 26 Mar 2025 13:28:19 +1100 Stephen Rothwell <[email protected]>…
After merging the bcachefs tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/bcachefs/time_stats.c: In function 'bch2_time_stats_reset':fs/bcachefs/time_stats.c:165:27: error: comparison of pointers to disjoint address spaces
165 |stats->buffer!=TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_exit':fs/bcachefs/time_stats.c:175:27: error: comparison of pointers to disjoint address spaces
175 | if (stats->buffer!=TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':fs/bcachefs/time_stats.c:192:23: error: assignment from pointer to non-enclosed address space
192 |stats->buffer=TIME_STATS_NONPCPU;
| ^fs/bcachefs/time_stats.c:192:23: note: expected '__seg_gsstructtime_stat_buffer*' but pointer is of type 'structtime_stat_buffer*'Caused by commit
5490554cf06f("bcachefs:bch2_time_stats_init_no_pcpu()")interacting with commit
6a367577153a("percpu/x86: enable strict percpu checks via named AS qualifiers")
(or an associated one)from the mm-stable tree.
I have applied the following merge fix patch for today (but I think it could just be applied to the bcachefs tree).
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Mar 2025 13:15:00 +1100
Subject: [PATCH] fix up for "bcachefs:bch2_time_stats_init_no_pcpu()"interacting with "percpu/x86: enable strict percpu checks via named AS qualifiers"
Signed-off-by Stephen Rothwell <[email protected]>--- fs/bcachefs/time_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/bcachefs/time_stats.c +1
-1@@ -11,7 +11,7 @@#include "time_stats.h" /* disable automatic switching to percpu mode */ -#define TIME_STATS_NONPCPU ((struct time_stat_buffer *) 1) +#define TIME_STATS_NONPCPU ((struct time_stat_buffer __percpu *) 1)static const struct time_unit time_units[] = { {"ns" ,1 },Signature · 1 line
2.45.2
This now fails like this:
fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':fs/bcachefs/time_stats.c:190:23: error: assignment from pointer to non-enclosed address space
190 | stats->buffer = (struct time_stat_buffer __rcu *) TIME_STATS_NONPCPU;
| ^fs/bcachefs/time_stats.c:190:23: note: expected '__seg_gs struct time_stat_buffer *' but pointer is of type 'struct time_stat_buffer *'
I have now )instead of the above) applied the following merge fix patch (which should be able to be applied to the bcachefs tree directly):
From: Stephen Rothwell <[email protected]>
Date: Thu, 27 Mar 2025 11:42:11 +1100
Subject: [PATCH] fix up 2 for "bcachefs: bch2_time_stats_init_no_pcpu()"
--- fs/bcachefs/time_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/bcachefs/time_stats.c +1 -1
@@ -187,5 +187,5 @@ void bch2_time_stats_init(struct bch2_time_stats *stats)void bch2_time_stats_init_no_pcpu (struct bch2_time_stats *stats) {bch2_time_stats_init (stats); - stats->buffer = (struct time_stat_buffer __rcu *)TIME_STATS_NONPCPU ; + stats->buffer = (struct time_stat_buffer __percpu *)TIME_STATS_NONPCPU ; }
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 86 lines · Stephen Rothwell
Hi all,
Quoted 58 lines · On Wed, 26 Mar 2025 13:28:19 +1100 Stephen Rothwell <[email protected]>…
After merging the bcachefs tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/bcachefs/time_stats.c: In function 'bch2_time_stats_reset':fs/bcachefs/time_stats.c:165:27: error: comparison of pointers to disjoint address spaces
165 |stats->buffer!=TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_exit':fs/bcachefs/time_stats.c:175:27: error: comparison of pointers to disjoint address spaces
175 | if (stats->buffer!=TIME_STATS_NONPCPU) {
| ^~fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':fs/bcachefs/time_stats.c:192:23: error: assignment from pointer to non-enclosed address space
192 |stats->buffer=TIME_STATS_NONPCPU;
| ^fs/bcachefs/time_stats.c:192:23: note: expected '__seg_gsstructtime_stat_buffer*' but pointer is of type 'structtime_stat_buffer*'Caused by commit
5490554cf06f("bcachefs:bch2_time_stats_init_no_pcpu()")interacting with commit
6a367577153a("percpu/x86: enable strict percpu checks via named AS qualifiers")
(or an associated one)from the mm-stable tree.
I have applied the following merge fix patch for today (but I think it could just be applied to the bcachefs tree).
From: Stephen Rothwell <[email protected]>
Date: Wed, 26 Mar 2025 13:15:00 +1100
Subject: [PATCH] fix up for "bcachefs:bch2_time_stats_init_no_pcpu()"interacting with "percpu/x86: enable strict percpu checks via named AS qualifiers"
Signed-off-by Stephen Rothwell <[email protected]>--- fs/bcachefs/time_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/bcachefs/time_stats.c +1
-1@@ -11,7 +11,7 @@#include "time_stats.h" /* disable automatic switching to percpu mode */ -#define TIME_STATS_NONPCPU ((struct time_stat_buffer *) 1) +#define TIME_STATS_NONPCPU ((struct time_stat_buffer __percpu *) 1)static const struct time_unit time_units[] = { {"ns" ,1 },Signature · 1 line
2.45.2This now fails like this:
fs/bcachefs/time_stats.c: In function 'bch2_time_stats_init_no_pcpu':fs/bcachefs/time_stats.c:190:23: error: assignment from pointer to non-enclosed address space
190 |stats->buffer= (structtime_stat_buffer__rcu*)TIME_STATS_NONPCPU;
| ^fs/bcachefs/time_stats.c:190:23: note: expected '__seg_gsstructtime_stat_buffer*' but pointer is of type 'structtime_stat_buffer*'I have now )instead of the above) applied the following merge fix patch (which should be able to be applied to the bcachefs tree directly):
From: Stephen Rothwell <[email protected]>
Date: Thu, 27 Mar 2025 11:42:11 +1100
Subject: [PATCH] fix up 2 for "bcachefs:bch2_time_stats_init_no_pcpu()"Signed-off-by Stephen Rothwell <[email protected]>--- fs/bcachefs/time_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/bcachefs/time_stats.c +0
-0
fs/bcachefs/time_stats.c void bch2_time_stats_init(struct bch2_time_stats *stats) · line 190
Quoted 5 lines
fs/bcachefs/time_stats.c +1
-1@@ -187,5 +187,5 @@ void bch2_time_stats_init(struct bch2_time_stats *stats)void bch2_time_stats_init_no_pcpu (struct bch2_time_stats *stats) {bch2_time_stats_init (stats); - stats->buffer = (struct time_stat_buffer __rcu *)TIME_STATS_NONPCPU ; + stats->buffer = (struct time_stat_buffer __percpu *)TIME_STATS_NONPCPU ;
Thanks, late night brain fart...