Convert several Filesystem methods to u64 offset#650
Convert several Filesystem methods to u64 offset#650cberner wants to merge 1 commit intocberner:masterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c8749effd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| pub(crate) fn offset(&self) -> Result<u64, Errno> { | ||
| let offset = self.arg.offset as u64; | ||
| validate_off_t("fuse_lseek_in.arg.offset", offset)?; |
There was a problem hiding this comment.
Preserve signed lseek offsets from kernel request
fuse_lseek_in.offset is a signed off_t value, so negative offsets are valid inputs for cases like SEEK_END/SEEK_CUR; converting it to u64 here causes any negative request to become a large unsigned value and fail validate_off_t, returning EINVAL before the filesystem callback runs. This regresses valid lseek behavior and should keep the request offset signed through dispatch.
Useful? React with 👍 / 👎.
No description provided.