All of lore.kernel.org
 help / color / mirror / Atom feed
From: Atila Romero <atila.alr@dpf.gov.br>
To: linux-btrfs@vger.kernel.org
Subject: Compression of large files
Date: Wed, 27 May 2009 11:10:09 -0300	[thread overview]
Message-ID: <4A1D49C1.8070903@dpf.gov.br> (raw)

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?

Atila


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

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

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=4A1D49C1.8070903@dpf.gov.br \
    --to=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.