-
Notifications
You must be signed in to change notification settings - Fork 249
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
[RFE] An option to recompress files #944
Comments
It would be really nice if There are some other ways to set and manage compression too. |
Oh, I see, thanks! I didn't think to look at |
Oh, but how does it work then for |
The implicit reason for this question is because this makes me think: what if the command doesn't actually inherit the level, but expects you to provide |
Using |
Compression always uses the level specified in the mount options (which may be the default if the mount option didn't specify level). That means you can do something like:
which would recompress "everything" in users' Downloads directories with level 9. This is not ideal because:
A more reliable way to achieve this is:
but that has other obvious problems (it will continually break reflinks with snapshots, recompress data unnecessarily, and it should definitely not be run on a multi-user system) and some less-obvious ones (it will limit the extent length for uncompressed files to 512K). A proper tool for this has to do a few extra steps:
|
Okay, reopening per last comment |
Users sometimes have directories with content that rarely if ever change, such as various git repositories downloaded for examination purposes, or WINE-based installations, or even just the complete
~/Downloads
folder outright. It may be desirable for them to be compressed with high compression level such as zstd:10, to reduce both space and IO.At the same time, keeping such high compression at all times is not desirable, because it would be stressing out CPU for little gain.
Would be great if
btrfs fi
(or another utility) supported an option to recompress a directory with a different compression level.The text was updated successfully, but these errors were encountered: