Skip to content
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

util.h - unmap region of block device #62

Closed
wants to merge 5 commits into from

Conversation

borex99
Copy link
Contributor

@borex99 borex99 commented Nov 5, 2023

In RDWR mode, if file is a block device, like a SSD or ZVOL, try to unmap the region on block device, using ioctl BLKDISCARD.

In RDWR mode, if file is a block device, like a SSD or ZVOL on ZFS, try to unmap the region on block device, using ioctl BLKDISCARD.
@fujita
Copy link
Owner

fujita commented Nov 5, 2023

Please replace spaces with tabs.

@borex99
Copy link
Contributor Author

borex99 commented Nov 5, 2023

The changes contain only tabs, without spaces.

@fujita
Copy link
Owner

fujita commented Nov 5, 2023

Oops, my bad.
Please check the CI failure.

Fixed a BIG bug in the code: ioctl.h does not included.
No warnings when compile
@borex99 borex99 marked this pull request as draft November 5, 2023 12:08
Changed description for thin-provisioning, since block devices are supported.
@borex99 borex99 marked this pull request as ready for review November 5, 2023 13:50
usr/util.h Outdated Show resolved Hide resolved
Enabled thin-provision option for discarding ranges from block devices, that supporting discard.
If file is a block device, UNMAP command don't try a PUNCH HOLE in device, now it call ioctl BLKDISCARD.
@fujita
Copy link
Owner

fujita commented Nov 6, 2023

squashed and pushed, thanks.

@fujita fujita closed this Nov 6, 2023
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.

2 participants