On Mon, Apr 9, 2012 at 6:06 AM, Stroller <strol...@stellar.eclipse.co.uk> wrote:
>
> On 8 April 2012, at 19:21, Canek Peláez Valdés wrote:
>> …
>> And (optionally) convert all the files and directories to use extends:
>>
>> find <directory> -xdev -type f -print0 | xargs -0 chattr +e
>> find <directory> -xdev -type d -print0 | xargs -0 chattr +e
>
> Ok, so I was just casually reading the chattr manpage, following this post…
>
>       The  letters  `acdeijstuADST'  select the new attributes for the files:
>       append only (a), compressed  (c), …
>
>       A  file  with  the `c' attribute set is automatically compressed on the
>       disk by the kernel.  A read from this file returns  uncompressed  data.
>       A  write  to this file compresses data before storing them on the disk.
>
> COMPRESSED?!?!
>
> You mean, all I need to do is `touch new.dd.img && chattr +c new.dd.img && dd 
> if=/dev/sdX of=new.dd.img` and I never again need to worry about piping dd 
> through bzip and bunzip?
>
> If I have a massive great big uncompressed dd image, I can compress it as 
> simply as touching a new file, changing this attribute on the new file and 
> copying it over?
>
> Is there a reason I've been unaware of this? Why isn't this hugely popular?
>
> Stroller.

>From the kernel sources, Documentation/filesystems/ext2.txt:

" Specification
=============

ext2 shares many properties with traditional Unix filesystems.  It has
the concepts of blocks, inodes and directories.  It has space in the
specification for Access Control Lists (ACLs), fragments, undeletion and
compression though these are not yet implemented (some are available as
separate patches).  There is also a versioning mechanism to allow new
features (such as journalling) to be added in a maximally compatible
manner. "

So, ext2's extended attribute set listed support for compression
(among other things), but it wasn't implemented. None of the other
ext*.txt files reference compression.

Digging into the kenrel source for ext4 in linux-3.2.1.-gentoo-r2,
there are symbols defined for managing compression, but they're not
used. In short, compression support is specced, but not implemented.



-- 
:wq

Reply via email to