Lines Matching refs:err
885 int err = 0; in do_dump() local
888 err = dump_dnode(dscp, &range->sru.object.bp, range->object, in do_dump()
891 if (!err && range->sru.object.spill_range) in do_dump()
892 err = do_dump(dscp, range->sru.object.spill_range); in do_dump()
893 return (err); in do_dump()
902 err = dump_object_range(dscp, &range->sru.object_range.bp, in do_dump()
908 err = dump_redact(dscp, range->object, range->start_blkid * in do_dump()
911 return (err); in do_dump()
923 err = dump_write_embedded(dscp, range->object, in do_dump()
926 return (err); in do_dump()
938 err = srdp->io_err; in do_dump()
941 if (err != 0) { in do_dump()
972 err = dump_spill(dscp, bp, range->object, data); in do_dump()
973 return (err); in do_dump()
986 while (srdp->datablksz > 0 && err == 0) { in do_dump()
989 err = dmu_dump_write(dscp, srdp->obj_type, in do_dump()
1003 err = dmu_dump_write(dscp, srdp->obj_type, in do_dump()
1008 return (err); in do_dump()
1039 return (err); in do_dump()
1207 int err = 0; in send_traverse_thread() local
1211 err = traverse_dataset_resume(st_arg->os->os_dsl_dataset, in send_traverse_thread()
1215 if (err != EINTR) in send_traverse_thread()
1216 st_arg->error_code = err; in send_traverse_thread()
1305 int err = dsl_redaction_list_traverse(rlt_arg->rl, in redact_list_thread() local
1307 if (err != EINTR) in redact_list_thread()
1308 rlt_arg->error_code = err; in redact_list_thread()
1494 int err = 0; in send_merge_thread() local
1515 !range->eos_marker && err == 0 && !smt_arg->cancel; in send_merge_thread()
1531 err = smt_arg->to_arg->error_code; in send_merge_thread()
1533 err = smt_arg->from_arg->error_code; in send_merge_thread()
1536 err = smt_arg->redact_arg->error_code; in send_merge_thread()
1539 if (smt_arg->cancel && err == 0) in send_merge_thread()
1540 err = SET_ERROR(EINTR); in send_merge_thread()
1541 smt_arg->error = err; in send_merge_thread()
1762 int err = 0; in send_reader_thread() local
1775 err == 0) { in send_reader_thread()
1825 err = dnode_hold(os, range->object, FTAG, &dn); in send_reader_thread()
1826 if (err == ENOENT) { in send_reader_thread()
1828 err = 0; in send_reader_thread()
1834 if (err != 0) { in send_reader_thread()
1868 err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK, in send_reader_thread()
1870 if (err == ESRCH) { in send_reader_thread()
1872 err = 0; in send_reader_thread()
1873 } else if (err != 0) { in send_reader_thread()
1891 err = dbuf_dnode_findbp(dn, 0, blkid, &bp, in send_reader_thread()
1893 if (err != 0) in send_reader_thread()
1905 if (srta->cancel || err != 0) { in send_reader_thread()
1907 srta->error = err; in send_reader_thread()
2183 int err = 0; in setup_resume_points() local
2190 err = dmu_object_info(os, obj, &to_doi); in setup_resume_points()
2191 if (err != 0) in setup_resume_points()
2192 return (err); in setup_resume_points()
2369 int err; in dmu_send_impl() local
2388 err = dmu_objset_from_ds(to_ds, &os); in dmu_send_impl()
2389 if (err != 0) { in dmu_send_impl()
2391 return (err); in dmu_send_impl()
2406 err = arc_untransform(os->os_phys_buf, os->os_spa, in dmu_send_impl()
2408 if (err != 0) { in dmu_send_impl()
2410 return (err); in dmu_send_impl()
2416 if ((err = setup_featureflags(dspp, os, &featureflags)) != 0) { in dmu_send_impl()
2418 return (err); in dmu_send_impl()
2425 err = dsl_redaction_list_hold_obj(dp, in dmu_send_impl()
2428 if (err != 0) { in dmu_send_impl()
2440 err = dsl_redaction_list_hold_obj(dp, in dmu_send_impl()
2442 if (err != 0) { in dmu_send_impl()
2528 err = setup_resume_points(dspp, to_arg, from_arg, in dmu_send_impl()
2530 if (err != 0) in dmu_send_impl()
2539 err = dsl_crypto_populate_key_nvlist(os, ivset_guid, in dmu_send_impl()
2541 if (err != 0) { in dmu_send_impl()
2556 err = dump_record(&dsc, payload, payload_len); in dmu_send_impl()
2558 if (err != 0) { in dmu_send_impl()
2559 err = dsc.dsc_err; in dmu_send_impl()
2570 while (err == 0 && !range->eos_marker) { in dmu_send_impl()
2571 err = do_dump(&dsc, range); in dmu_send_impl()
2574 err = SET_ERROR(EINTR); in dmu_send_impl()
2583 if (err != 0) { in dmu_send_impl()
2598 if (err == 0 && srt_arg->error != 0) in dmu_send_impl()
2599 err = srt_arg->error; in dmu_send_impl()
2601 if (err != 0) in dmu_send_impl()
2606 err = SET_ERROR(EINTR); in dmu_send_impl()
2608 if (err != 0) { in dmu_send_impl()
2609 if (err == EINTR && dsc.dsc_err != 0) in dmu_send_impl()
2610 err = dsc.dsc_err; in dmu_send_impl()
2626 err = dsc.dsc_err; in dmu_send_impl()
2633 VERIFY(err != 0 || (dsc.dsc_sent_begin && in dmu_send_impl()
2654 return (err); in dmu_send_impl()
2663 int err; in dmu_send_obj() local
2678 err = dsl_pool_hold(pool, FTAG, &dspp.dp); in dmu_send_obj()
2679 if (err != 0) in dmu_send_obj()
2680 return (err); in dmu_send_obj()
2682 err = dsl_dataset_hold_obj_flags(dspp.dp, tosnap, dsflags, FTAG, in dmu_send_obj()
2684 if (err != 0) { in dmu_send_obj()
2686 return (err); in dmu_send_obj()
2690 err = dsl_dataset_hold_obj(dspp.dp, fromsnap, FTAG, &fromds); in dmu_send_obj()
2692 if (err != 0) { in dmu_send_obj()
2695 return (err); in dmu_send_obj()
2731 err = SET_ERROR(EXDEV); in dmu_send_obj()
2733 err = dmu_send_impl(&dspp); in dmu_send_obj()
2737 err = dmu_send_impl(&dspp); in dmu_send_obj()
2744 return (err); in dmu_send_obj()
2754 int err = 0; in dmu_send() local
2778 err = dsl_pool_hold(tosnap, FTAG, &dspp.dp); in dmu_send()
2779 if (err != 0) in dmu_send()
2780 return (err); in dmu_send()
2803 err = dsl_dataset_own_force(dspp.dp, name, dsflags, in dmu_send()
2805 if (err == ENOENT) { in dmu_send()
2806 err = dsl_dataset_own_force(dspp.dp, tosnap, in dmu_send()
2810 if (err == 0) { in dmu_send()
2812 err = zap_lookup(dspp.dp->dp_meta_objset, in dmu_send()
2818 if (err == 0) { in dmu_send()
2819 err = zap_lookup(dspp.dp->dp_meta_objset, in dmu_send()
2826 if (owned && (err != 0)) in dmu_send()
2831 err = dsl_dataset_own(dspp.dp, tosnap, dsflags, in dmu_send()
2833 if (err == 0) in dmu_send()
2837 err = dsl_dataset_hold_flags(dspp.dp, tosnap, dsflags, FTAG, in dmu_send()
2841 if (err != 0) { in dmu_send()
2844 return (err); in dmu_send()
2852 err = EINVAL; in dmu_send()
2856 err = dsl_bookmark_lookup(dspp.dp, path, in dmu_send()
2862 if (err != 0) { in dmu_send()
2868 return (err); in dmu_send()
2890 err = dsl_dataset_hold(dspp.dp, fromsnap, FTAG, in dmu_send()
2893 if (err != 0) { in dmu_send()
2919 err = SET_ERROR(EXDEV); in dmu_send()
2943 err = dsl_bookmark_lookup(dspp.dp, fromsnap, dspp.to_ds, in dmu_send()
2945 if (err == EXDEV && zb->zbm_redaction_obj != 0 && in dmu_send()
2948 err = 0; in dmu_send()
2951 if (err == 0) { in dmu_send()
2953 err = dmu_send_impl(&dspp); in dmu_send()
2963 err = dmu_send_impl(&dspp); in dmu_send()
2969 return (err); in dmu_send()
2976 int err = 0; in dmu_adjust_send_estimate_for_indirects() local
2993 err = dsl_prop_get_int_ds(ds, in dmu_adjust_send_estimate_for_indirects()
2996 err = dsl_prop_get_int_ds(ds, in dmu_adjust_send_estimate_for_indirects()
2999 if (err != 0) in dmu_adjust_send_estimate_for_indirects()
3000 return (err); in dmu_adjust_send_estimate_for_indirects()
3033 int err; in dmu_send_estimate_fast() local
3053 err = dsl_dataset_hold(origds->ds_dir->dd_pool, in dmu_send_estimate_fast()
3055 if (err != ENOENT && err != 0) { in dmu_send_estimate_fast()
3056 return (err); in dmu_send_estimate_fast()
3057 } else if (err == ENOENT) { in dmu_send_estimate_fast()
3062 err = zap_lookup(mos, ds->ds_object, in dmu_send_estimate_fast()
3064 if (err != 0) { in dmu_send_estimate_fast()
3065 err = SET_ERROR(err == ENOENT ? EINVAL : err); in dmu_send_estimate_fast()
3069 err = zap_lookup(mos, ds->ds_object, in dmu_send_estimate_fast()
3071 if (err != 0) { in dmu_send_estimate_fast()
3072 err = SET_ERROR(err == ENOENT ? EINVAL : err); in dmu_send_estimate_fast()
3084 err = SET_ERROR(EINVAL); in dmu_send_estimate_fast()
3089 err = SET_ERROR(EXDEV); in dmu_send_estimate_fast()
3093 err = dsl_dataset_space_written(fromds, ds, &used, &comp, in dmu_send_estimate_fast()
3095 if (err != 0) in dmu_send_estimate_fast()
3099 err = dsl_dataset_space_written_bookmark(frombook, ds, &used, in dmu_send_estimate_fast()
3101 if (err != 0) in dmu_send_estimate_fast()
3108 err = dmu_adjust_send_estimate_for_indirects(ds, uncomp, comp, in dmu_send_estimate_fast()
3118 return (err); in dmu_send_estimate_fast()