Lines Matching defs:drr

190 dump_record(dmu_replay_record_t *drr, void *payload, int payload_len,
195 fletcher_4_incremental_native(drr,
197 if (drr->drr_type != DRR_BEGIN) {
198 ASSERT(ZIO_CHECKSUM_IS_ZERO(&drr->drr_u.
200 drr->drr_u.drr_checksum.drr_checksum = *zc;
202 fletcher_4_incremental_native(&drr->drr_u.drr_checksum.drr_checksum,
204 if (write(outfd, drr, sizeof (*drr)) == -1)
237 dmu_replay_record_t *drr = &thedrr;
267 while (ssread(drr, sizeof (*drr), ofp) != 0) {
269 switch (drr->drr_type) {
272 struct drr_begin *drrb = &drr->drr_u.drr_begin;
285 if (drr->drr_payloadlen != 0) {
286 sz = drr->drr_payloadlen;
296 if (dump_record(drr, buf, sz, &stream_cksum,
304 struct drr_end *drre = &drr->drr_u.drr_end;
307 if (dump_record(drr, NULL, 0, &stream_cksum,
315 struct drr_object *drro = &drr->drr_u.drr_object;
321 if (dump_record(drr, buf,
330 struct drr_spill *drrs = &drr->drr_u.drr_spill;
332 if (dump_record(drr, buf, drrs->drr_length,
340 if (dump_record(drr, NULL, 0, &stream_cksum,
348 struct drr_write *drrw = &drr->drr_u.drr_write;
419 if (dump_record(drr, buf, payload_size,
429 &drr->drr_u.drr_write_embedded;
432 if (dump_record(drr, buf,
441 if (dump_record(drr, NULL, 0, &stream_cksum,
449 drr->drr_type);
1784 dmu_replay_record_t drr = { 0 };
1821 drr.drr_type = DRR_BEGIN;
1822 drr.drr_u.drr_begin.drr_magic = DMU_BACKUP_MAGIC;
1823 DMU_SET_STREAM_HDRTYPE(drr.drr_u.drr_begin.
1825 DMU_SET_FEATUREFLAGS(drr.drr_u.drr_begin.
1827 (void) snprintf(drr.drr_u.drr_begin.drr_toname,
1828 sizeof (drr.drr_u.drr_begin.drr_toname),
1830 drr.drr_payloadlen = buflen;
1832 err = dump_record(&drr, packbuf, buflen, &zc, outfd);
1838 bzero(&drr, sizeof (drr));
1839 drr.drr_type = DRR_END;
1840 drr.drr_u.drr_end.drr_checksum = zc;
1841 err = write(outfd, &drr, sizeof (drr));
1976 dmu_replay_record_t drr = { 0 };
1977 drr.drr_type = DRR_END;
1978 if (write(outfd, &drr, sizeof (drr)) == -1) {
2675 recvflags_t *flags, dmu_replay_record_t *drr, zio_cksum_t *zc,
2695 assert(drr->drr_type == DRR_BEGIN);
2696 assert(drr->drr_u.drr_begin.drr_magic == DMU_BACKUP_MAGIC);
2697 assert(DMU_GET_STREAM_HDRTYPE(drr->drr_u.drr_begin.drr_versioninfo) ==
2703 if (drr->drr_payloadlen != 0) {
2704 error = recv_read_nvlist(hdl, fd, drr->drr_payloadlen,
2752 if (drr->drr_payloadlen != 0) {
2770 struct drr_begin *drrb = &drr->drr_u.drr_begin;
2828 (void) strlcpy(sendfs, drr->drr_u.drr_begin.drr_toname,
2860 if (drr->drr_payloadlen != 0 && fromsnap != NULL) {
2895 dmu_replay_record_t *drr;
2903 drr = buf;
2905 while (recv_read(hdl, fd, drr, sizeof (dmu_replay_record_t),
2908 drr->drr_type = BSWAP_32(drr->drr_type);
2910 switch (drr->drr_type) {
2912 if (drr->drr_payloadlen != 0) {
2914 drr->drr_payloadlen, B_FALSE, NULL);
2924 drr->drr_u.drr_object.drr_bonuslen =
2925 BSWAP_32(drr->drr_u.drr_object.
2929 P2ROUNDUP(drr->drr_u.drr_object.drr_bonuslen, 8),
2935 drr->drr_u.drr_write.drr_logical_size =
2937 drr->drr_u.drr_write.drr_logical_size);
2938 drr->drr_u.drr_write.drr_compressed_size =
2940 drr->drr_u.drr_write.drr_compressed_size);
2943 DRR_WRITE_PAYLOAD_SIZE(&drr->drr_u.drr_write);
2949 drr->drr_u.drr_spill.drr_length =
2950 BSWAP_64(drr->drr_u.drr_spill.drr_length);
2953 drr->drr_u.drr_spill.drr_length, B_FALSE, NULL);
2957 drr->drr_u.drr_write_embedded.drr_psize =
2958 BSWAP_32(drr->drr_u.drr_write_embedded.
2962 P2ROUNDUP(drr->drr_u.drr_write_embedded.drr_psize,
3020 const char *originsnap, recvflags_t *flags, dmu_replay_record_t *drr,
3029 struct drr_begin *drrb = &drr->drr_u.drr_begin;
3600 dmu_replay_record_t drr, drr_noswap;
3601 struct drr_begin *drrb = &drr.drr_u.drr_begin;
3624 if (0 != (err = recv_read(hdl, infd, &drr, sizeof (drr), B_FALSE,
3628 if (drr.drr_type == DRR_END || drr.drr_type == BSWAP_32(DRR_END)) {
3634 drr_noswap = drr;
3643 fletcher_4_incremental_byteswap(&drr, sizeof (drr), &zcksum);
3646 drr.drr_type = BSWAP_32(drr.drr_type);
3647 drr.drr_payloadlen = BSWAP_32(drr.drr_payloadlen);
3657 if (drrb->drr_magic != DMU_BACKUP_MAGIC || drr.drr_type != DRR_BEGIN) {
3689 drr.drr_u.drr_begin.drr_toname,
3697 &drr, &drr_noswap, sendfs, stream_nv, stream_avl, top_zfs,
3702 return (zfs_receive_package(hdl, infd, tosnap, flags, &drr,