Skip to content

Commit

Permalink
It helps when you include the fixes for avx512, huh?
Browse files Browse the repository at this point in the history
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
  • Loading branch information
rincebrain committed Jul 17, 2022
1 parent 1630bd4 commit 87cfc56
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/libzfs/libzfs_sendrecv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,12 +2060,12 @@ send_prelim_records(zfs_handle_t *zhp, const char *from, int fd,
int err = 0;
char *packbuf = NULL;
size_t buflen = 0;
zio_cksum_t zc = { {0} };
zio_cksum_t *zc = calloc(sizeof (zio_cksum_t), 1);
int featureflags = 0;
/* name of filesystem/volume that contains snapshot we are sending */
char tofs[ZFS_MAX_DATASET_NAME_LEN];
/* short name of snap we are sending */
char *tosnap = "";
const char *tosnap = "";

char errbuf[ERRBUFLEN];
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
Expand Down Expand Up @@ -2102,6 +2102,7 @@ send_prelim_records(zfs_handle_t *zhp, const char *from, int fd,
if ((err = gather_nvlist(zhp->zfs_hdl, tofs,
from, tosnap, recursive, raw, doall, replicate, skipmissing,
verbose, backup, holds, props, &fss, fsavlp)) != 0) {
free(zc);
return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP,
errbuf));
}
Expand All @@ -2117,6 +2118,7 @@ send_prelim_records(zfs_handle_t *zhp, const char *from, int fd,
"is too large to be received successfully.\n"
"Select a smaller number of snapshots to send.\n"),
zhp->zfs_name);
free(zc);
return (zfs_error(zhp->zfs_hdl, EZFS_NOSPC,
errbuf));
}
Expand All @@ -2143,21 +2145,24 @@ send_prelim_records(zfs_handle_t *zhp, const char *from, int fd,
if (snprintf(drr.drr_u.drr_begin.drr_toname,
sizeof (drr.drr_u.drr_begin.drr_toname), "%s@%s", tofs,
tosnap) >= sizeof (drr.drr_u.drr_begin.drr_toname)) {
free(zc);
return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP,
errbuf));
}
drr.drr_payloadlen = buflen;

err = dump_record(&drr, packbuf, buflen, &zc, fd);
err = dump_record(&drr, packbuf, buflen, zc, fd);
free(packbuf);
if (err != 0) {
zfs_error_aux(zhp->zfs_hdl, "%s", strerror(err));
free(zc);
return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP,
errbuf));
}
err = send_conclusion_record(fd, &zc);
err = send_conclusion_record(fd, zc);
if (err != 0) {
zfs_error_aux(zhp->zfs_hdl, "%s", strerror(err));
free(zc);
return (zfs_error(zhp->zfs_hdl, EZFS_BADBACKUP,
errbuf));
}
Expand Down

0 comments on commit 87cfc56

Please sign in to comment.