Skip to contentSkip to conversation

btrfs-progs: use EXPERIMENTAL instead of CONFIG_BTRFS_DEBUG

PATCH In review Boris Burkov 4 participants 6 messages Mar 14, 2024 – Mar 19, 2024 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: use EXPERIMENTAL instead of CONFIG_BTRFS_DEBUG

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Use EXPERIMENTAL which does work after:

        ./configure --enable-experimental
---
 kernel-shared/send.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel-shared/send.h +1 -1
index 34de60ff0..ce4a99e31 100644
@@ -25,7 +25,7 @@
 
 #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
 /* Conditional support for the upcoming protocol version. */
-#ifdef CONFIG_BTRFS_DEBUG
+#if EXPERIMENTAL
 #define BTRFS_SEND_STREAM_VERSION 3
 #else
 #define BTRFS_SEND_STREAM_VERSION 2
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Boris Burkov

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Use EXPERIMENTAL which does work after:

         ./configure --enable-experimental

This seems to be a direct sync between kernel and btrfs-progs, thus we got the kernel macro not properly translated.

Thanks,
Qu

Quoted 17 lines
---
  kernel-shared/send.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
kernel-shared/send.h +1 -1
index 34de60ff0..ce4a99e31 100644
@@ -25,7 +25,7 @@
 
  #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
  /* Conditional support for the upcoming protocol version. */
-#ifdef CONFIG_BTRFS_DEBUG
+#if EXPERIMENTAL
  #define BTRFS_SEND_STREAM_VERSION 3
  #else
  #define BTRFS_SEND_STREAM_VERSION 2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Boris Burkov
Quoted 5 lines · Boris Burkov

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Use EXPERIMENTAL which does work after:

Thanks.

Quoted 20 lines
         ./configure --enable-experimental
---
  kernel-shared/send.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
kernel-shared/send.h +1 -1
index 34de60ff0..ce4a99e31 100644
@@ -25,7 +25,7 @@
 
  #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
  /* Conditional support for the upcoming protocol version. */
-#ifdef CONFIG_BTRFS_DEBUG
+#if EXPERIMENTAL
  #define BTRFS_SEND_STREAM_VERSION 3
  #else
  #define BTRFS_SEND_STREAM_VERSION 2
#3 lore raw
In reply to Boris Burkov
Quoted 4 lines · Boris Burkov

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Use EXPERIMENTAL which does work after:

Ok, makes sense. I missed that because I searched for EXPERIMENTAL and did not find anything relevant but CONFIG_BTRFS_DEBUG has an effect. I'll add a comment so it does not get accidentally changed back when syncin the kernel code. Thanks.

#4 lore raw
Quoted 11 lines · David Sterba
Quoted 4 lines · Boris Burkov

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Use EXPERIMENTAL which does work after:

Ok, makes sense. I missed that because I searched for EXPERIMENTAL and did not find anything relevant but CONFIG_BTRFS_DEBUG has an effect. I'll add a comment so it does not get accidentally changed back when syncin the kernel code. Thanks.

Can't we just convert CONFIG_BTRFS_DEBUG to EXPERIMENTAL in kerncompat.h?

Thanks,
Qu

#5 lore raw
Quoted 7 lines · Qu Wenruo
Quoted 4 lines · David Sterba
Quoted 3 lines · Boris Burkov

not sure exactly how this ifdef was supposed to work originally, but it currently doesn't and I don't see other use cases of this pattern.

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

Use EXPERIMENTAL which does work after:

Ok, makes sense. I missed that because I searched for EXPERIMENTAL and did not find anything relevant but CONFIG_BTRFS_DEBUG has an effect. I'll add a comment so it does not get accidentally changed back when syncin the kernel code. Thanks.

Can't we just convert CONFIG_BTRFS_DEBUG to EXPERIMENTAL in kerncompat.h?

In principle yes, but the code from kernel and user space is not close enough so that would be safe so this needs an audit what could break.