From: Chris Mason <clm@fb.com>
To: Wang Shilong <wangsl.fnst@cn.fujitsu.com>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] Btrfs: don't compress for a small write
Date: Mon, 31 Mar 2014 08:31:39 -0400 [thread overview]
Message-ID: <5339602B.2070207@fb.com> (raw)
In-Reply-To: <1395655091-5318-1-git-send-email-wangsl.fnst@cn.fujitsu.com>
On 03/24/2014 05:58 AM, Wang Shilong wrote:
> To compress a small write(<=blocksize) dosen't save us
> disk space at all, skip it can save us some compression time.
>
> This patch can also fix wrong setting nocompression flag for
> inode, say a case when @total_in is 4096, and then we get
> @total_compressed 52,because we do aligment to page cache size
> firstly, and then we get into conclusion @total_in=@total_compressed
> thus we will clear this inode's compression flag.
>
> An exception comes from inserting inline extent failure but we
> still have @total_compressed < @total_in,so we will still reset
> inode's flag, this is ok, because we don't have good compression
> effect.
>
So your check for start > 0 || end + 1 < disk_i_size means we're only
skipping compression for a small file range that isn't in an inline
extent. Could you please update the patch description and comments in
the code to reflect this?
Thanks!
-chris
next prev parent reply other threads:[~2014-03-31 12:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 9:58 [PATCH 1/2] Btrfs: don't compress for a small write Wang Shilong
2014-03-24 9:58 ` [PATCH 2/2] Btrfs: scrub raid56 stripes in the right way Wang Shilong
2014-03-28 12:00 ` Wang Shilong
2014-03-26 18:10 ` [PATCH 1/2] Btrfs: don't compress for a small write David Sterba
2014-03-27 3:06 ` Wang Shilong
2014-03-31 12:31 ` Chris Mason [this message]
2014-03-31 12:53 ` Shilong Wang
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=5339602B.2070207@fb.com \
--to=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangsl.fnst@cn.fujitsu.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 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.