Thread (8 messages) 8 messages, 5 authors, 2021-10-30

Re: [PATCH v2] btrfs: send: prepare for v2 protocol

From: David Sterba <hidden>
Date: 2021-10-29 16:03:36

On Wed, Oct 27, 2021 at 03:17:46PM +0800, Anand Jain wrote:
On 22/10/2021 22:53, David Sterba wrote:
quoted
--- a/fs/btrfs/send.h
+++ b/fs/btrfs/send.h
@@ -48,6 +48,7 @@ struct btrfs_tlv_header {
  enum btrfs_send_cmd {
  	BTRFS_SEND_C_UNSPEC,
  
+	/* Version 1 */
  	BTRFS_SEND_C_SUBVOL,
  	BTRFS_SEND_C_SNAPSHOT,
  
@@ -76,6 +77,12 @@ enum btrfs_send_cmd {
  
  	BTRFS_SEND_C_END,
  	BTRFS_SEND_C_UPDATE_EXTENT,
+	__BTRFS_SEND_C_MAX_V1,
+
+	/* Version 2 */
+	__BTRFS_SEND_C_MAX_V2,
+
  Isn't this has to be in tandem with BTRFS_SEND_STREAM_VERSION == 2?
The patch is only preparatory and adds the base code for the real
protocol updates where the STREAM_VERSION will be increased, but does
not do that yet so we don't falsely advertise v2 support when there's no
such thing.
  The changelog doesn't explain the plan of __BTRFS_SEND_C_MAX_Vx use case.
It's supposed to prevent doubts and questions "what should I do when I
want to add v2 command" and make the code ready for anybody working on
the v2 update.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help