Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Christoph Anton Mitterer <calestyo@scientia.org>,
	Filipe Manana <fdmanana@kernel.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: defrag: add under utilized extent to defrag target list
Date: Wed, 10 Jan 2024 08:47:19 +1030	[thread overview]
Message-ID: <61b6a8db-61ad-4c59-9f35-49e30a6437cc@gmx.com> (raw)
In-Reply-To: <adb8b47a1dcb44747b15dde1aa6ac8c2592edd45.camel@scientia.org>



On 2024/1/10 08:27, Christoph Anton Mitterer wrote:
> On Wed, 2024-01-10 at 07:34 +1030, Qu Wenruo wrote:
>> The 1/16 is chosen as a trade-off between wasted space and possible
>> unnecessary defrag.
>
> Felipe's point doesn't seem so invalid.... wouldn't it be possible to
> make the trade-off somehow configurable, so that the user can choose
> via some command line option?

We have 16 bytes extra space for the ioctl, I think we can go 2 u32 to
configure both ratio and wasted space if needed.

Unfortunately we don't have any existing checks on
btrfs_ioctl_defrag_range_args::flags, which means we have no way to
detect if the kernel supports new flags.

I'll start adding such rejection first, then we can start adding new
btrfs_ioctl_defrag_range_args flags/options to support configurable
ratio/wasted bytes.

Thanks,
Qu

>
> Cheers,
> Chris.

  reply	other threads:[~2024-01-09 22:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05  7:33 [PATCH] btrfs: defrag: add under utilized extent to defrag target list Qu Wenruo
2024-01-05 16:45 ` Andrei Borzenkov
2024-01-05 20:11   ` Qu Wenruo
2024-01-09 14:55 ` Filipe Manana
2024-01-09 16:12   ` Filipe Manana
2024-01-09 21:04   ` Qu Wenruo
2024-01-09 21:57     ` Christoph Anton Mitterer
2024-01-09 22:17       ` Qu Wenruo [this message]
2024-01-10 17:09 ` David Sterba
2024-01-11  6:24   ` Qu Wenruo
2024-01-12 15:58     ` David Sterba
2024-01-13  3:17       ` Qu Wenruo
2024-01-13  8:05         ` Andrei Borzenkov
2024-01-13  8:32           ` Qu Wenruo
2024-01-13  3:47       ` Christoph Anton Mitterer
2024-02-05  5:39 ` Christoph Anton Mitterer
2024-02-05  5:42   ` Qu Wenruo
2024-04-20  4:30     ` Skirnir Torvaldsson

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=61b6a8db-61ad-4c59-9f35-49e30a6437cc@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=calestyo@scientia.org \
    --cc=fdmanana@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox