[master] Allow opt-out of discard on disk format#64310
[master] Allow opt-out of discard on disk format#64310jseba wants to merge 3 commits intosaltstack:masterfrom
Conversation
|
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
Ch3LL
left a comment
There was a problem hiding this comment.
This looks good, but just needs a changelog entry (https://docs.saltproject.io/en/latest/topics/development/changelog.html)
b756990 to
cf72788
Compare
|
I added the changelog entry, also went ahead and rebased on master |
|
Looks like there are related test failures that need to be resolved. Also can you ensure to rebase as there was recent test fixes merged in. |
twangboy
left a comment
There was a problem hiding this comment.
This also needs to be rebased and conflicts resolved
|
|
||
| This option is dangerous, use it with caution. | ||
|
|
||
| discard |
There was a problem hiding this comment.
This needs a .. version-added:: marker
What does this PR do?
This allows disk images to be formatted explicitly non-sparsely by enabling callers to disable the automatic discard of blocks during filesystem creation.
This is only supported for ext and xfs filesystems.
What issues does this PR fix or reference?
Fixes:
Current behavior of formatting disk images results in e.g. a 20GB disk image being reduced to 44MB on the parent filesystem, which shows up as potential free space when other things are looking at the parent's disk usage. If the parent filesystem no longer has blocks to service the disk image's usage, it gets ENOSPC errors when it is not at 100% usage.
New Behavior
Callers to
disk.formatandblockdev.formattedcan specifydiscard=Falsefor ext and xfs filesystems to disable their respective mkfs tools from doing a block discard during filesystem creation. This ensures the disk image is still reserving blocks on the parent filesystem for itself if it was created non-sparsely.Merge requirements satisfied?
Commits signed with GPG?
No