public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dhaval Giani <dgiani@mozilla.com>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-kernel@vger.kernel.org, tytso@mit.edu, tglek@mozilla.com,
	vdjeric@mozilla.com, glandium@mozilla.com,
	linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC/PATCH 0/2] ext4: Transparent Decompression Support
Date: Thu, 25 Jul 2013 11:16:06 -0400	[thread overview]
Message-ID: <51F14136.30409@mozilla.com> (raw)
In-Reply-To: <20130724233628.GD3641@logfs.org>

On 07/24/2013 07:36 PM, Jörn Engel wrote:
> On Wed, 24 July 2013 17:03:53 -0400, Dhaval Giani wrote:
>> I am posting this series early in its development phase to solicit some
>> feedback.
> At this state, a good description of the format would be nice.

Sure. The format is quite simple. There is a 20 byte header followed by 
an offset table giving us the offsets of 16k compressed zlib chunks (The 
16k is the default number, it can be changed with the use of szip tool, 
the kernel should still decompress it as that data is in the header). I 
am not tied to the format. I used it as that is what being used here. My 
final goal is the have the filesystem agnostic of the compression format 
as long as it is seekable.

>
>> We are implementing transparent decompression with a focus on ext4. One
>> of the main usecases is that of Firefox on Android. Currently libxul.so
>> is compressed and it is loaded into memory by a custom linker on
>> demand. With the use of transparent decompression, we can make do
>> without the custom linker. More details (i.e. code) about the linker can
>> be found at https://github.com/glandium/faulty.lib
> It is not quite clear what you want to achieve here.

To introduce transparent decompression. Let someone else do the 
compression for us, and supply decompressed data on demand  (in this 
case a read call). Reduces the complexity which would otherwise have to 
be brought into the filesystem.

>    One approach is
> to create an empty file, chattr it to enable compression, then write
> uncompressed data to it.  Nothing in userspace will ever know the file
> is compressed, unless you explicitly call lsattr.
>
> If you want to follow some other approach where userspace has one
> interface to write the compressed data to a file and some other
> interface to read the file uncompressed, you are likely in a world of
> pain.
Why? If it is going to only be a few applications who know the file is 
compressed, and read it to get decompressed data, why would it be 
painful? What about introducing a new flag, O_COMPR which tells the 
kernel, btw, we want this file to be decompressed if it can be. It can 
fallback to O_RDONLY or something like that? That gets rid of the chattr 
ugliness.

> Assuming you use the chattr approach, that pretty much comes down to
> adding compression support to ext4.  There have been old patches for
> ext2 around that never got merged.  Reading up on the problems
> encountered by those patches might be instructive.

Do you have subjects for these? When I googled for ext4 compression, I 
found http://code.google.com/p/e4z/ which doesn't seem to exist, and 
checking in my LKML archives gives too many false positives.

Thanks!
Dhaval

  reply	other threads:[~2013-07-25 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24 21:03 [RFC/PATCH 0/2] ext4: Transparent Decompression Support Dhaval Giani
2013-07-24 23:36 ` Jörn Engel
2013-07-25 15:16   ` Dhaval Giani [this message]
2013-07-25 15:29     ` Phillip Lougher
2013-07-25 16:42     ` Taras Glek
2013-07-25 17:53       ` Jörn Engel
2013-07-25 19:27         ` Dhaval Giani
2013-07-25 18:15       ` Vyacheslav Dubeyko
2013-07-25 18:35         ` Dhaval Giani
2013-07-26  8:01           ` Vyacheslav Dubeyko
2013-07-26 13:20             ` Jörn Engel
2013-07-29 23:15               ` Mike Hommey
2013-08-04  0:33               ` Theodore Ts'o
2013-08-04  2:21                 ` Jörn Engel
2013-08-04 23:48                   ` Dave Chinner
2013-08-07  9:21                     ` Andreas Dilger
2013-08-07 15:52                       ` Jörn Engel
     [not found]         ` <51F16B9A.5020006@mozilla.com>
2013-07-26  7:47           ` Vyacheslav Dubeyko
2013-07-25 18:05     ` Jörn Engel
2013-07-25 20:09       ` Zach Brown
2013-07-25 18:46         ` Jörn Engel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F14136.30409@mozilla.com \
    --to=dgiani@mozilla.com \
    --cc=glandium@mozilla.com \
    --cc=joern@logfs.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglek@mozilla.com \
    --cc=tytso@mit.edu \
    --cc=vdjeric@mozilla.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox