linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: send: gate SEND_A_MAX and SEND_C_MAX V3
@ 2022-09-26 18:15 Boris Burkov
  2022-09-27 12:24 ` David Sterba
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Burkov @ 2022-09-26 18:15 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

We haven't finalized send stream v3 yet, so gate setting the max command
values behind CONFIG_BTRFS_DEBUG.

In my testing, and judging from the code, this is a cosmetic change;
verity send commands are still produced (and processed by a compatible
btrfs-progs), even with CONFIG_BTRFS_DEBUG=n set.

Signed-off-by: Boris Burkov <boris@bur.io>
---
 fs/btrfs/send.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/btrfs/send.h b/fs/btrfs/send.h
index 0a4537775e0c..23661b37ea64 100644
--- a/fs/btrfs/send.h
+++ b/fs/btrfs/send.h
@@ -94,9 +94,13 @@ enum btrfs_send_cmd {
 
 	/* Version 3 */
 	BTRFS_SEND_C_ENABLE_VERITY	= 26,
+#ifndef CONFIG_BTRFS_DEBUG
+	BTRFS_SEND_C_MAX		= 25,
+#else
 	BTRFS_SEND_C_MAX_V3		= 26,
 	/* End */
 	BTRFS_SEND_C_MAX		= 26,
+#endif
 };
 
 /* attributes in send stream */
@@ -168,9 +172,14 @@ enum {
 	BTRFS_SEND_A_VERITY_BLOCK_SIZE	= 33,
 	BTRFS_SEND_A_VERITY_SALT_DATA	= 34,
 	BTRFS_SEND_A_VERITY_SIG_DATA	= 35,
+
+#ifndef CONFIG_BTRFS_DEBUG
+	__BTRFS_SEND_A_MAX		= 31,
+#else
 	BTRFS_SEND_A_MAX_V3		= 35,
 
 	__BTRFS_SEND_A_MAX		= 35,
+#endif
 };
 
 long btrfs_ioctl_send(struct inode *inode, struct btrfs_ioctl_send_args *arg);
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-27 16:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-26 18:15 [PATCH] btrfs: send: gate SEND_A_MAX and SEND_C_MAX V3 Boris Burkov
2022-09-27 12:24 ` David Sterba
2022-09-27 16:02   ` Boris Burkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).