Skip to content

Conversation

@Chen-Yifan
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 12, 2025 16:27
Copilot finished reviewing on behalf of Chen-Yifan November 12, 2025 16:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the try_trim_contents() function where the write offset was incorrectly calculated for block devices. The issue occurred when writing back a partial page after TRIM operations.

  • Corrects the write offset calculation in try_trim_contents() by subtracting DISK_PAGE_SIZE from range[0]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Chen-Yifan Chen-Yifan force-pushed the vicky/fix-trim-offset branch 2 times, most recently from e66e623 to a2d59e5 Compare November 13, 2025 02:00
maxkozlovsky
maxkozlovsky previously approved these changes Nov 13, 2025
…to start TRIM is not a multiple of disk page size, also includes minor code cleanup.
@jhunsaker jhunsaker merged commit b777b5d into main Nov 13, 2025
8 checks passed
@jhunsaker jhunsaker deleted the vicky/fix-trim-offset branch November 13, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants