linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: dsterba@suse.cz, Josef Bacik <josef@toxicpanda.com>,
	linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH][v2] btrfs: add an ioctl to force chunk allocation
Date: Mon, 5 Aug 2019 18:01:42 +0200	[thread overview]
Message-ID: <09cfdb54-736c-c344-07d4-382b954f7f9f@applied-asynchrony.com> (raw)
In-Reply-To: <20190805154118.GA28208@twin.jikos.cz>

On 8/5/19 5:41 PM, David Sterba wrote:
> On Mon, Aug 05, 2019 at 04:10:39PM +0200, Holger Hoffstätte wrote:
>> On 8/5/19 3:19 PM, Josef Bacik wrote:
>>> In testing block group removal it's sometimes handy to be able to create
>>> block groups on demand.  Add an ioctl to allow us to force allocation
>>> from userspace.
>>>
>>> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
>>> ---
>>> v1->v2:
>>> - I noticed last week when backporting this that btrfs_chunk_alloc doesn't
>>>     figure out the rest of the flags needed for the type.  Use
>>>     btrfs_force_chunk_alloc instead so that we get the raid settings for the alloc
>>>     type we're using.
>>
>> Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
>>
>> Now works as intended - very nice, thanks!
> 
> Tell me, are you interested in this ioctl because it was the missing bit
> for testing or because the chunk allocator is so bad that you need a
> command to make work?

Mostly curiosity. "To make [it] work" would be a bit strong - btrfs works
fine by now. But yes, slightly over-allocating both metadata and data
(both by ~1-2 chunks) helps esp. when there is a mix of small and large
files, and to reduce fragmentation of large files. That should not be
surprising.

-h

  reply	other threads:[~2019-08-05 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 13:19 [PATCH][v2] btrfs: add an ioctl to force chunk allocation Josef Bacik
2019-08-05 14:10 ` Holger Hoffstätte
2019-08-05 15:41   ` David Sterba
2019-08-05 16:01     ` Holger Hoffstätte [this message]
2019-08-05 14:14 ` Qu Wenruo
2019-08-05 14:39   ` Josef Bacik
2019-08-05 14:39 ` Nikolay Borisov
2019-08-05 16:00 ` David Sterba

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=09cfdb54-736c-c344-07d4-382b954f7f9f@applied-asynchrony.com \
    --to=holger@applied-asynchrony.com \
    --cc=dsterba@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --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;
as well as URLs for NNTP newsgroup(s).