Skip to content

Commit ee2a9d2

Browse files
PaulZ-98tonyhutter
authored andcommitted
Fix dmu_recv_stream test for resumable
Use dsl_dataset_has_resume_receive_state() not dsl_dataset_is_zapified() to check if stream is resumable. Reviewed-by: Matthew Ahrens <[email protected]> Reviewed-by: Alek Pinchuk <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Paul Zuchowski <[email protected]> Closes #12034
1 parent 3e0bc63 commit ee2a9d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

module/zfs/dmu_recv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,8 +2878,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, offset_t *voffp)
28782878
int err = 0;
28792879
struct receive_writer_arg *rwa = kmem_zalloc(sizeof (*rwa), KM_SLEEP);
28802880

2881-
if (dsl_dataset_is_zapified(drc->drc_ds)) {
2882-
uint64_t bytes;
2881+
if (dsl_dataset_has_resume_receive_state(drc->drc_ds)) {
2882+
uint64_t bytes = 0;
28832883
(void) zap_lookup(drc->drc_ds->ds_dir->dd_pool->dp_meta_objset,
28842884
drc->drc_ds->ds_object, DS_FIELD_RESUME_BYTES,
28852885
sizeof (bytes), 1, &bytes);

0 commit comments

Comments
 (0)