• Omar Sandoval's avatar
    btrfs: send: explicitly number commands and attributes · 54cab6af
    Omar Sandoval authored
    Commit e77fbf99 ("btrfs: send: prepare for v2 protocol") added
    _BTRFS_SEND_C_MAX_V* macros equal to the maximum command number for the
    version plus 1, but as written this creates gaps in the number space.
    
    The maximum command number is currently 22, and __BTRFS_SEND_C_MAX_V1 is
    accordingly 23. But then __BTRFS_SEND_C_MAX_V2 is 24, suggesting that v2
    has a command numbered 23, and __BTRFS_SEND_C_MAX is 25, suggesting that
    23 and 24 are valid commands.
    
    Instead, let's explicitly number all of the commands, attributes, and
    sentinel MAX constants.
    Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    54cab6af
send.c 194 KB