- if (es == 12 || es == 13) {
- DSS_WARNING_LOG("rsync process %d returned %d -- restarting\n",
- (int)create_pid, es);
+ if (es != 0 && es != 24) {
+ DSS_WARNING_LOG(("rsync exit code %d, error count %d\n",
+ es, ++num_consecutive_rsync_errors));
+ if (conf.create_given) {
+ ret = -E_BAD_EXIT_CODE;
+ goto out;
+ }
+ if (num_consecutive_rsync_errors > conf.max_rsync_errors_arg) {
+ ret = -E_TOO_MANY_RSYNC_ERRORS;
+ snapshot_creation_status = HS_READY;
+ goto out;
+ }
+ DSS_WARNING_LOG(("restarting rsync process\n"));