btrfs-progs icon indicating copy to clipboard operation
btrfs-progs copied to clipboard

btrfs-progs: receive: cannot find clone source subvol when receiving in reverse direction

Open ettavolt opened this issue 1 year ago • 10 comments

process_clone, unlike process_snapshot, only searched a subvolume matching by received uuid. However, when earlier "receiver" side sends, it mentions received uuid, which is for earlier "send" side (now "receiver" side) is just uuid.

Fixes #606.

ettavolt avatar Jun 18 '23 00:06 ettavolt

New test before the change: test-fail.log and after: test-pass.log.

Note, I've collected these with btrfs -v receive, which is not set in what I've pushed.

ettavolt avatar Jun 18 '23 00:06 ettavolt

Looks like ubuntu-latest is 22.04, not even 23.04, or dd would have known oseek.

I've changed the test to old parameter name.

ettavolt avatar Nov 13 '23 23:11 ettavolt

Why did it decide to fail in 028-superblock-recover now, but not during previous run? :-O

ettavolt avatar Nov 13 '23 23:11 ettavolt

The test 028 randomly fails in the github CI, I don't know why, you don't have to worry about it.

kdave avatar Nov 14 '23 00:11 kdave

Looks like ubuntu-latest is 22.04, not even 23.04, or dd would have known oseek.

Yeah the CI images are old (kernel and user space), so the tests have to test for new features or not use new functionality.

kdave avatar Nov 14 '23 00:11 kdave

The first parameter of search_source_subvol should be changed from a struct subvol_uuid_search * to an int, which I suggest naming mnt_fd, otherwise this generates some integer <->pointer conversion warnings.

(Note that there are two different declarations of subvol_uuid_search in btrfs-progs, which probably caused the confusion with the typings).

(Also posted to LKML before I saw that there was also an open PR, sorry for the spam)

joanbm avatar Nov 20 '23 21:11 joanbm

Thanks, joanbm. To me that looked like a copy-paste error. ☺

ettavolt avatar Nov 21 '23 00:11 ettavolt

Sorry, kdave, do I need to do something else to have this merged?

ettavolt avatar Dec 19 '23 01:12 ettavolt

Hi @kdave, sorry for the noise, but can this be merged please? Is there anything I can do to improve the patch?

ettavolt avatar Feb 13 '24 12:02 ettavolt

Sorry, I keep forgetting about this PR. Marked for 6.8.1 or 6.9 at the latest.

kdave avatar Apr 29 '24 17:04 kdave

Now added to devel, thanks. As said in #606 I don't remember if there was a reason to do it as before, some use cases were not meant to be possible and some of them were with reverse receive. I hope nothing else breaks (we had such cases unfortunatelly).

kdave avatar May 17 '24 17:05 kdave

Minor changes to the test case: indentation and parameter quoting.

kdave avatar May 17 '24 17:05 kdave