Compression: effect of setting the c attribute: wiki unclear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On the wiki, it first speaks about forcing compression by adding the c
attribute, but later states that the c attribute enables, not forces
compression. Which is it? It seems like the typical use case
currently, given the inability to selectively compress subvolumes, is
the "if possible" choice.

============from https://btrfs.wiki.kernel.org/index.php/Compression

Can I force compression on a file without using the compress mount option?

Yes. The utility chattr supports setting file attribute c that marks
the inode to compress newly written data.

* * *

What's the precedence of all the options affecting compression?

Compression to newly written data happens:

always -- if the filesystem is mounted with compress-force
never -- if the NOCOMPRESS flag is set per-file/-directory
if possible -- if the COMPRESS per-file flag (aka chattr +c) is set,
but it may get converted to NOCOMPRESS eventually
if possible -- if the compress mount option is specified

Note, that mounting with compress will not set the +c file attribute.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux