start_heartbeat_monitor(jcr);
if (have_acl) {
- jcr->acl_data = get_pool_memory(PM_MESSAGE);
+ jcr->acl_data = (acl_data_t *)malloc(sizeof(acl_data_t));
+ memset((caddr_t)jcr->acl_data, 0, sizeof(acl_data_t));
+ jcr->acl_data->content = get_pool_memory(PM_MESSAGE);
}
+
if (have_xattr) {
- jcr->xattr_data = get_pool_memory(PM_MESSAGE);
+ jcr->xattr_data = (xattr_data_t *)malloc(sizeof(xattr_data_t));
+ memset((caddr_t)jcr->xattr_data, 0, sizeof(xattr_data_t));
+ jcr->xattr_data->content = get_pool_memory(PM_MESSAGE);
}
/* Subroutine save_file() is called for each file */
set_jcr_job_status(jcr, JS_ErrorTerminated);
}
+ if (have_acl && jcr->acl_data->nr_errors > 0) {
+ Jmsg(jcr, M_ERROR, 0, _("Encountered %ld acl errors while doing backup\n"),
+ jcr->acl_data->nr_errors);
+ }
+ if (have_xattr && jcr->xattr_data->nr_errors > 0) {
+ Jmsg(jcr, M_ERROR, 0, _("Encountered %ld xattr errors while doing backup\n"),
+ jcr->xattr_data->nr_errors);
+ }
+
accurate_send_deleted_list(jcr); /* send deleted list to SD */
stop_heartbeat_monitor(jcr);
sd->signal(BNET_EOD); /* end of sending data */
if (have_acl && jcr->acl_data) {
- free_pool_memory(jcr->acl_data);
+ free_pool_memory(jcr->acl_data->content);
+ free(jcr->acl_data);
jcr->acl_data = NULL;
}
if (have_xattr && jcr->xattr_data) {
- free_pool_memory(jcr->xattr_data);
+ free_pool_memory(jcr->xattr_data->content);
+ free(jcr->xattr_data);
jcr->xattr_data = NULL;
}
if (jcr->big_buf) {
*/
if (have_acl) {
if (ff_pkt->flags & FO_ACL && ff_pkt->type != FT_LNK && !ff_pkt->cmd_plugin) {
- if (build_acl_streams(jcr, ff_pkt) == bsub_exit_fatal)
+ switch (build_acl_streams(jcr, ff_pkt)) {
+ case bacl_exit_fatal:
goto bail_out;
+ case bacl_exit_error:
+ /*
+ * Non-fatal errors, count them and when the number is under ACL_REPORT_ERR_MAX_PER_JOB
+ * print the error message set by the lower level routine in jcr->errmsg.
+ */
+ if (jcr->acl_data->nr_errors < ACL_REPORT_ERR_MAX_PER_JOB) {
+ Jmsg(jcr, M_ERROR, 0, "%s", jcr->errmsg);
+ }
+ jcr->acl_data->nr_errors++;
+ break;
+ case bacl_exit_ok:
+ break;
+ }
}
}
*/
if (have_xattr) {
if (ff_pkt->flags & FO_XATTR && !ff_pkt->cmd_plugin) {
- if (build_xattr_streams(jcr, ff_pkt) == bsub_exit_fatal)
+ switch (build_xattr_streams(jcr, ff_pkt)) {
+ case bxattr_exit_fatal:
goto bail_out;
+ case bxattr_exit_error:
+ /*
+ * Non-fatal errors, count them and when the number is under XATTR_REPORT_ERR_MAX_PER_JOB
+ * print the error message set by the lower level routine in jcr->errmsg.
+ */
+ if (jcr->xattr_data->nr_errors < XATTR_REPORT_ERR_MAX_PER_JOB) {
+ Jmsg(jcr, M_ERROR, 0, "%s", jcr->errmsg);
+ }
+ jcr->xattr_data->nr_errors++;
+ break;
+ case bxattr_exit_ok:
+ break;
+ }
}
}
* <file-index> <stream> <info>
*/
if (!sd->fsend("%ld %d 0", jcr->JobFiles, stream)) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(300, ">stored: datahdr %s\n", sd->msg);
}
sd->msg = wbuf; /* set correct write buffer */
if (!sd->send()) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(130, "Send data to SD len=%d\n", sd->msglen);
sd->msglen = encrypted_len; /* set encrypted length */
sd->msg = jcr->crypto.crypto_buf; /* set correct write buffer */
if (!sd->send()) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
Dmsg1(130, "Send data to SD len=%d\n", sd->msglen);
}
if (!sd->signal(BNET_EOD)) { /* indicate end of file data */
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
goto err;
}
* <file-index> <stream> <info>
*/
if (!sd->fsend("%ld %d 0", jcr->JobFiles, attr_stream)) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
return false;
}
Dmsg1(300, ">stored: attrhdr %s\n", sd->msg);
Dmsg2(300, ">stored: attr len=%d: %s\n", sd->msglen, sd->msg);
if (!stat) {
- Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
- sd->bstrerror());
+ if (!job_canceled(jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, _("Network send error to SD. ERR=%s\n"),
+ sd->bstrerror());
+ }
return false;
}
sd->signal(BNET_EOD); /* indicate end of attributes data */