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

fi defrag: add option to set compression level #328

Closed
michel-slm opened this issue Dec 28, 2020 · 1 comment
Closed

fi defrag: add option to set compression level #328

michel-slm opened this issue Dec 28, 2020 · 1 comment
Labels
enhancement kernel something in kernel has to be done too

Comments

@michel-slm
Copy link

When setting or changing compression options, a user might want to defragment the existing filesystem to recompress existing files with the new settings.

However, btrfs fi defrag currently does not support it, or if it does, it is not documented. This should probably be added?

 
❯ rpm -q btrfs-progs                
btrfs-progs-5.7-5.fc33.x86_64

~ 
❯ btrfs filesystem defrag --help
usage: btrfs filesystem defragment [options] <file>|<dir> [<file>|<dir>...]

    Defragment a file or a directory

    -r                  defragment files recursively
    -c[zlib,lzo,zstd]   compress the file while defragmenting
    -f                  flush data to disk immediately after defragmenting
    -s start            defragment only from byte onward
    -l len              defragment only up to len bytes
    -t size             target extent size hint (default: 32M)
    -v                  deprecated, alias for global -v option
    
    Global options:
    -v|--verbose       increase output verbosity
    
    Warning: most Linux kernels will break up the ref-links of COW data
    (e.g., files copied with 'cp --reflink', snapshots) which may cause
    considerable increase of space usage. See btrfs-filesystem(8) for
    more information.
@kdave kdave added enhancement kernel something in kernel has to be done too labels Feb 12, 2021
@kdave
Copy link
Owner

kdave commented Oct 21, 2022

Duplicate of #184, let's continue there.

@kdave kdave closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement kernel something in kernel has to be done too
Projects
None yet
Development

No branches or pull requests

2 participants