All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Atila Romero <atila.alr@dpf.gov.br>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Compression of large files
Date: Wed, 27 May 2009 10:41:27 -0400	[thread overview]
Message-ID: <20090527144127.GA11706@think> (raw)
In-Reply-To: <4A1D49C1.8070903@dpf.gov.br>

On Wed, May 27, 2009 at 11:10:09AM -0300, Atila Romero wrote:
> During a file write, if the compression doesn't proves to be economical
> to a portion of the file, the whole file is marked as nocompress, and
> subsequent writes don't use compression at all. This can be seen as a 
> feature, as it saves CPU in files like videos. But if the file is a dd
> image of a disk, or other types of large files, this behavior is
> undesirable, since different portions of the file will have different
> compression ratios.
> I only became aware of this after searching the source code, after
> spending some hours trying to find out why the compression wasn't
> working. This can be a really unexpected behavior for a end user who is
> looking for compression.
> The specific part of the code is at inode.c:
> 477 <#l477>
>                 /* flag the file so we don't compress in the future */
> 478 <#l478>                 btrfs_set_flag(inode, NOCOMPRESS);
> 
> How about commenting line 478?

The plan is to add a flag for the file to make it always compress even
when parts of the file do not compress well.

-chris


      reply	other threads:[~2009-05-27 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27 14:10 Compression of large files Atila Romero
2009-05-27 14:41 ` Chris Mason [this message]

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=20090527144127.GA11706@think \
    --to=chris.mason@oracle.com \
    --cc=atila.alr@dpf.gov.br \
    --cc=linux-btrfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.