From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: add test case to verify that btrfs won't waste IO/CPU to defrag compressed extents already at their max size
Date: Wed, 2 Feb 2022 08:07:22 +0800 [thread overview]
Message-ID: <9d3b5405-2d76-dd2e-1b1b-a404d3cb4db1@gmx.com> (raw)
In-Reply-To: <20220201151439.GR14046@twin.jikos.cz>
On 2022/2/1 23:14, David Sterba wrote:
> On Thu, Jan 27, 2022 at 01:53:06PM +0800, Qu Wenruo wrote:
>> There is a long existing bug in btrfs defrag code that it will always
>> try to defrag compressed extents, even they are already at max capacity.
>
> As commended under the patch, this not considered a bug, because the
> defrag ioctl is expected to reshuffle the extents, with or without
> compression and improving the compression ratio if asked to recompress
> with hither level. What is not perfect is the kernel side that could try
> harder to merge extents into bigger contiguous chunks, but as long as
> the compression is involved it's not possible to decide if the extents
> should be skipped or not.
What I can do is to add extra test to make sure if "btrfs fi defrag -c"
always defrag the file no matter whatever.
To me, these two factors don't conflict with each other at all.
Thanks,
Qu
next prev parent reply other threads:[~2022-02-02 0:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 5:53 [PATCH] btrfs: add test case to verify that btrfs won't waste IO/CPU to defrag compressed extents already at their max size Qu Wenruo
2022-01-27 11:37 ` Filipe Manana
2022-01-27 11:44 ` Filipe Manana
2022-01-27 15:38 ` Ritesh Harjani
2022-01-27 22:20 ` Qu Wenruo
2022-01-28 2:56 ` Ritesh Harjani
2022-01-28 3:10 ` Qu Wenruo
2022-02-01 15:14 ` David Sterba
2022-02-02 0:07 ` Qu Wenruo [this message]
2022-02-02 8:46 ` Qu Wenruo
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=9d3b5405-2d76-dd2e-1b1b-a404d3cb4db1@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.cz \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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