FreeBSD Bugzilla – Attachment 218246 Details for
Bug 249579
[ZFS] Can't resume a zfs receive stream to a dataset with a mounted clone
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
In iter_dependents_cb, don't recurse into clones of the destination
bug249579.diff (text/plain), 1.42 KB, created by
Alan Somers
on 2020-09-24 17:06:43 UTC
(
hide
)
Description:
In iter_dependents_cb, don't recurse into clones of the destination
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2020-09-24 17:06:43 UTC
Size:
1.42 KB
patch
obsolete
>Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c >=================================================================== >--- cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c (revision 366121) >+++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c (working copy) >@@ -468,6 +468,7 @@ > typedef struct iter_dependents_arg { > boolean_t first; > boolean_t allowrecursion; >+ boolean_t in_children; > iter_stack_frame_t *stack; > zfs_iter_f func; > void *data; >@@ -479,10 +480,12 @@ > iter_dependents_arg_t *ida = arg; > int err = 0; > boolean_t first = ida->first; >+ boolean_t was_in_children; > ida->first = B_FALSE; > > if (zhp->zfs_type == ZFS_TYPE_SNAPSHOT) { >- err = zfs_iter_clones(zhp, iter_dependents_cb, ida); >+ if (ida->in_children) >+ err = zfs_iter_clones(zhp, iter_dependents_cb, ida); > } else if (zhp->zfs_type != ZFS_TYPE_BOOKMARK) { > iter_stack_frame_t isf; > iter_stack_frame_t *f; >@@ -516,7 +519,10 @@ > isf.zhp = zhp; > isf.next = ida->stack; > ida->stack = &isf; >+ was_in_children = ida->in_children; >+ ida->in_children = B_TRUE; > err = zfs_iter_filesystems(zhp, iter_dependents_cb, ida); >+ ida->in_children = was_in_children; > if (err == 0) { > err = zfs_iter_snapshots(zhp, B_FALSE, > iter_dependents_cb, ida, 0, 0); >@@ -542,5 +548,6 @@ > ida.func = func; > ida.data = data; > ida.first = B_TRUE; >+ ida.in_children = B_FALSE; > return (iter_dependents_cb(zfs_handle_dup(zhp), &ida)); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249579
:
218246
|
218303