}
if (have_xattr) {
jcr->xattr_data = get_pool_memory(PM_MESSAGE);
+ jcr->total_xattr_errors = 0;
}
while (bget_msg(sd) >= 0 && !job_canceled(jcr)) {
pm_memcpy(jcr->acl_data, sd->msg, sd->msglen);
jcr->acl_data_len = sd->msglen;
switch (parse_acl_streams(jcr, rctx.stream)) {
- case bsub_exit_fatal:
+ case bacl_exit_fatal:
goto bail_out;
- case bsub_exit_nok:
+ 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.
}
jcr->total_acl_errors++;
break;
- case bsub_exit_ok:
+ case bacl_exit_ok:
break;
}
} else {
if (have_xattr) {
pm_memcpy(jcr->xattr_data, sd->msg, sd->msglen);
jcr->xattr_data_len = sd->msglen;
- if (parse_xattr_streams(jcr, rctx.stream) != bsub_exit_ok) {
- Qmsg1(jcr, M_WARNING, 0, _("Can't restore Extended Attributes of %s\n"), jcr->last_fname);
+ switch (parse_xattr_streams(jcr, rctx.stream)) {
+ 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->total_xattr_errors < XATTR_REPORT_ERR_MAX_PER_JOB) {
+ Qmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+ }
+ jcr->total_xattr_errors++;
+ break;
+ case bxattr_exit_ok:
+ break;
}
} else {
non_support_xattr++;
Jmsg(jcr, M_ERROR, 0, _("Encountered %ld acl errors while doing restore\n"),
jcr->total_acl_errors);
}
+ if (jcr->total_xattr_errors > 0) {
+ Jmsg(jcr, M_ERROR, 0, _("Encountered %ld xattr errors while doing restore\n"),
+ jcr->total_xattr_errors);
+ }
if (non_support_data > 1 || non_support_attr > 1) {
Jmsg(jcr, M_ERROR, 0, _("%d non-supported data streams and %d non-supported attrib streams ignored.\n"),
non_support_data, non_support_attr);