summaryrefslogtreecommitdiffstats
path: root/rpm
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2020-05-14 20:48:29 -0700
committerGitHub <[email protected]>2020-05-14 20:48:29 -0700
commit1b9cd1a9d9ebd213df1427d38e75d3233c873bde (patch)
tree07a22ce7c2dda55048fe60a14153e56cfab5eaf7 /rpm
parentcdcce2f0190e05127d304fcc261cfdb5284ab621 (diff)
Fix error handling in receive_writer_thread()
If `receive_writer_thread()` gets an error from `receive_process_record()`, it should be saved in `rwa->err` so that we will stop processing records, and the main thread will notice that the receive has failed. When an error is first encountered, this happens correctly. However, if there are more records to dequeue, the next time through the loop we will reset `rwa->err` to zero, allowing us to try to process the following record (2 after the failed record). Depending on what types of records remain, we may incorrectly complete the receive "successfully", but without actually having processed all the records. The fix is to only set `rwa->err` if we got a *non-zero* error. This bug was introduced by #10099 "Improve zfs receive performance by batching writes". Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Dagnelie <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10320
Diffstat (limited to 'rpm')
0 files changed, 0 insertions, 0 deletions