pcd1193182 requested changes on this pull request.

I just looked through the zfs send related code, but that part of it seemed 
pretty good to me.

> @@ -1332,9 +1533,17 @@ recv_begin_check_existing_impl(dmu_recv_begin_arg_t 
> *drba, dsl_dataset_t *ds,
                /* if full, then must be forced */
                if (!drba->drba_cookie->drc_force)
                        return (SET_ERROR(EEXIST));
-               /* start from $ORIGIN@$ORIGIN, if supported */
-               drba->drba_snapobj = dp->dp_origin_snap != NULL ?

Do we not still want to start from $ORIGIN@$ORIGIN for non-encrypted receives?

>                               return (SET_ERROR(ENODEV));
                        }
-                       dsl_dataset_rele(origin, FTAG);
+                       dsl_dataset_rele_flags(origin,
+                           dsflags, FTAG);

Unflow this line?

        if (drrb->drr_flags & DRR_FLAG_CI_DATA)
                crflags |= DS_FLAG_CI_DATASET;
+       if ((featureflags & DMU_BACKUP_FEATURE_RAW) == 0) {

I don't much care either way, but for 1-line if statements we should probably 
try to keep brace/no brace consistency within the same function.

-       VERIFY0(dsl_dataset_own_obj(dp, dsobj, dmu_recv_tag, &ds));
+       VERIFY0(dsl_dataset_own_obj(dp, dsobj, dsflags, dmu_recv_tag, &ds));
+       VERIFY0(dmu_objset_from_ds(ds, &os));

Why do this here? It doesn't look like we use the os anywhere.

> +
+       /*
+        * By default, we assume this block is in our native format
+        * (ZFS_HOST_BYTEORDER). We then take into account whether
+        * the send stream is byteswapped (rwa->byteswap). Finally,
+        * we need to byteswap again if this particular block was
+        * in non-native format on the send side.
+        */
+       boolean_t byteorder = ZFS_HOST_BYTEORDER ^ rwa->byteswap ^
+           !!DRR_IS_RAW_BYTESWAPPED(drror->drr_flags);
+
+       /*
+        * Since dnode block sizes are constant, we should not need to worry
+        * about making sure that the dnode block size is the same on the
+        * sending and receiving sides for the time being. For non-raw sends,
+        * this does not matter (and in fact we do not send a DRR_OBJECT_RANGE

Given that we should never receive one of these for non-raw sends, do we want 
to add a check for that?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/124#pullrequestreview-58530651
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Ta17fb0edb29e7895-Mffadea297adbdd73caa9ff3d
Powered by Topicbox: https://topicbox.com

Reply via email to