Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow setting zstd compression level with btrfs defrag #184
Comments
|
This would be great for forcing greater compression on large static files without archiving them. |
|
This is my thinking. Stale files could be compressed higher without much loss of performance in case they need to be accessed. There are other use-cases too, I'm sure. |
|
This needs enhancement of the ioctl interface, there's space in the data structure to specify the level but it needs to be properly handled in kernel. |
|
Is this being worked on? Otherwise I'd like to attempt to implement this |
|
As visible above, the code is now written. I have no clue if i'm putting the pull request in the right place so please let me know if I should rebase or merge into another repo |
|
Any progress on this? AFAIK kernel (and hence, btrfs) development does not typically happen through GitHub. What would it take for the patches from the above pull requests to be merged into upstream? |
|
@qwerty123443 I believe it would be better if you could send the patches through the mailing list :) |
|
Ah yes, I've kind of forgotten about this. I'll take a look at the mailing list soon (tm). There is still some refinement to be done and at the moment I do not have the time to fix it up properly. For anyone reading this: feel free to use the code I've written and change it + submit it to the linux/btrfs mailing list |
|
I was wondering why the compression level is capped at 15 for zstd. They actually go up to 22 (when Would be nice to be able to compress files with more effort, if you don't bother about the speed. |
|
I've submitted a patch to the mailing list, and I hope it'll be merged soon. The patch can be found here |
Currently btrfs defrag -c zstd uses a fixed compression level. It would be useful to be able to set it manually. The same way we can in mount options. zstd:1-15.
Thanks.