-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: cannot mount LTFS tapes under Rocky Linux with lin_tape driver #399
bugfix: cannot mount LTFS tapes under Rocky Linux with lin_tape driver #399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks this fix is not correct.
We changed the prototype of logsense
method and it shall return the response length of log page.
The point you should take care is line 2266, the condition shall be if (rc < 0)
. (See same portion in sg_tape.c)
https://github.com/LinearTapeFileSystem/ltfs/blob/178a782ffed151ff890b41cfdf56f7b8343d3c45/src/tape_drivers/linux/lin_tape/lin_tape_ibmtape.c#L2265-2270
You can see the explanation of the prototype of logsense
prototype.
… to evaluate the return code according to the new semantic, which is negative for error, or positive page size for success
2b7b5fc
to
228a9b2
Compare
okay, thanks for reviewing this. I have pushed changes to the pull request which should fix all of the functions in lin_tape_ibmtape.c which call lin_tape_ibmtape_logsense() with the new return code semantic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, Thank you for your additional commit!
It is almost there. I just have one comment. Please let me know if you have opinion against your comment.
…c_stioc_command() returns with non-zero code
Okay I just pushed another commit to return "rc" instead of -1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your great contribution!
Please push the |
Summary of changes
This pull request includes one bugfix.
Description
This is a very simple fix. The bug is pretty obvious. It causes all LTFS tape mounts to fail on our new Rocky Linux 8 machine using the lin_tape driver, with a log output like this:
You can see the result of the bug - the lin_tape_ibmtape_remaining_capacity() function thinks that the lin_tape_ibmtape_logsense() failed because it returned the log page size (450) instead of the error code.
Type of change
Please delete items that are not relevant.
Checklist: