Skip to content

Commit fce29d6

Browse files
authored
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 210231e commit fce29d6

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
@@ -2880,8 +2880,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, offset_t *voffp)
28802880
int err = 0;
28812881
struct receive_writer_arg *rwa = kmem_zalloc(sizeof (*rwa), KM_SLEEP);
28822882

2883-
if (dsl_dataset_is_zapified(drc->drc_ds)) {
2884-
uint64_t bytes;
2883+
if (dsl_dataset_has_resume_receive_state(drc->drc_ds)) {
2884+
uint64_t bytes = 0;
28852885
(void) zap_lookup(drc->drc_ds->ds_dir->dd_pool->dp_meta_objset,
28862886
drc->drc_ds->ds_object, DS_FIELD_RESUME_BYTES,
28872887
sizeof (bytes), 1, &bytes);

0 commit comments

Comments
 (0)