Fix/write soft error handling - #630
Closed
madjesc wants to merge 8 commits into
Closed
Conversation
- clear the previous power on reset status and retry - retry in both ibmtape netbsd driver and the sg one - make _clear_por return an int
chore: revert separation of por and allocation issues
rangelmx
requested review from
XV02,
amissael95 and
syaoraang
and removed request for
syaoraang
August 10, 2026 20:32
amissael95
reviewed
Aug 10, 2026
| } else if (errno == ENOMEM && retry < MAX_WRITE_RETRY) { | ||
| rc = _handle_block_allocation_failure(device, pos, &retry); | ||
| ltfsmsg(LTFS_WARN, 30440W, ++retry); | ||
| sleep(3); // Wait for kernel GC |
Contributor
There was a problem hiding this comment.
What about using nanosleep? This does not use signals, such as SIGALRM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
This pull request includes the following changes:
Description
This PR addresses issues with write operation failures in tape drivers by implementing a more robust retry mechanism. The changes focus on properly handling buffer allocation errors and host errors (particularly power-on-reset conditions) by:
_clear_por()function that returns status instead of void_handle_block_write_failure()function to consolidate retry logicThe changes affect three tape drivers:
sg_tape.c)lin_tape_ibmtape.c)scsipi_ibmtape.c)Type of change
Checklist: