Bug 249438 - [ZFS] Regression in recv_incremental_replication() after MFC r354116, r354120
Summary: [ZFS] Regression in recv_incremental_replication() after MFC r354116, r354120
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Alan Somers
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-09-18 15:33 UTC by Dmitry Wagin
Modified: 2020-10-21 20:36 UTC (History)
2 users (show)

See Also:


Attachments
libzfs_sendrecv.c.diff (595 bytes, patch)
2020-09-18 15:33 UTC, Dmitry Wagin
no flags Details | Diff
Fix error merging r354116 from OpenZFS (5.05 KB, patch)
2020-10-21 20:36 UTC, Alan Somers
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2020-09-18 15:33:39 UTC
Created attachment 218061 [details]
libzfs_sendrecv.c.diff

After https://svnweb.freebsd.org/base?view=revision&revision=354568

> zfs send -R -I pool/test1@snap | zfs recv -F pool/test2

works incorrectly.

Snapshots deleted on pool/test1 are not deleted on pool/test2.
Comment 1 Dmitry Wagin 2020-10-17 10:22:09 UTC
ping
Comment 2 Alan Somers freebsd_committer 2020-10-17 13:40:30 UTC
"Works incorrectly" is not a bug report.  When reporting a bug to FreeBSD or any other project, you should provide a complete description of the problem, including exact steps to reproduce it, the problem's symptoms, and what you expect to happen instead.
Comment 3 Dmitry Wagin 2020-10-19 13:05:33 UTC
(In reply to Alan Somers from comment #2)
>Snapshots deleted on pool/test1 are not deleted on pool/test2.


ALL steps:

> zfs create pool/test1
> zfs snap pool/test1@snap1
> zfs send -R pool/test1@snap1 | zfs recv -F pool/test2
> zfs snap pool/test1@snap2
> zfs send -R -I pool/test1@snap1 pool/test1@snap2 | zfs recv -F pool/test2
> zfs destroy pool/test1@snap1
> zfs snap pool/test1@snap3
> zfs send -R -I pool/test1@snap2 pool/test1@snap3 | zfs recv -F pool/test2
^^^ after last step,
@snap1 should also be deleted on pool/test2.
Comment 4 Alan Somers freebsd_committer 2020-10-19 15:55:24 UTC
Reproduced on stable/12 at r366189M.  Cannot reproduce on head.
Comment 5 Dmitry Wagin 2020-10-19 16:01:30 UTC
(In reply to Alan Somers from comment #4)

HEAD doesn't have this typo.
Comment 6 Alan Somers freebsd_committer 2020-10-21 20:36:25 UTC
Created attachment 218957 [details]
Fix error merging r354116 from OpenZFS

When we merged 4c0883fb4af0d5565459099b98fcf90ecbfa1ca1 from OpenZFS (svn r354116), there were some merge conflicts.  One of those was resolved incorrectly, causing "zfs receive" to fail to delete snapshots that a "zfs send -R" stream has deleted.

This change corrects that merge conflict, and also reduces some harmless diffs vis-a-vis OpenZFS that were also introduced by r354116.  Direct commit to stable/12 because head has moved on to OpenZFS.