Fix BTRFS_SEND_C_CLONE#25
Open
pmorch wants to merge 1 commit into
Open
Conversation
It now aligns with https://github.com/torvalds/linux/blob/dd83757f6e686a2188997cb58b5975f744bb7786/fs/btrfs/send.c#L5394 This maybe fixes sysnux#22. Without this, I got this error: Traceback (most recent call last): File "/home/peter/work/btrfs-snapshots-diff/./btrfs-snapshots-diff.py", line 653, in <module> main() File "/home/peter/work/btrfs-snapshots-diff/./btrfs-snapshots-diff.py", line 620, in main commands, paths = stream.decode(bogus=args.bogus) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/peter/work/btrfs-snapshots-diff/./btrfs-snapshots-diff.py", line 325, in decode offset2, path = self._tlv_get_string('BTRFS_SEND_A_PATH', offset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/peter/work/btrfs-snapshots-diff/./btrfs-snapshots-diff.py", line 105, in _tlv_get_string raise ValueError(f'Unexpected attribute {self.send_attrs[attr]}') ValueError: Unexpected attribute BTRFS_SEND_A_FILE_OFFSET And according to btrfs/send.c BTRFS_SEND_A_PATH not supposed to be sent as the first element of a BTRFS_SEND_C_CLONE, but BTRFS_SEND_A_FILE_OFFSET is. The patch to create-example.sh causes the test to fail, but I cannot fix them because of sysnux#23.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It now aligns with https://github.com/torvalds/linux/blob/dd83757f6e686a2188997cb58b5975f744bb7786/fs/btrfs/send.c#L5394
This maybe fixes #22.
Without this, I got this error:
And according to btrfs/send.c BTRFS_SEND_A_PATH not supposed to be sent as the first element of a BTRFS_SEND_C_CLONE, but BTRFS_SEND_A_FILE_OFFSET is.
The patch to create-example.sh causes the test to fail, but I cannot fix them because of #23.
Without the fix, but with the patch to create-example.sh, we get the
ValueError: Unexpected attribute BTRFS_SEND_A_FILE_OFFSETfrom above.