linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: 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 10:39:42 -0400	[thread overview]
Message-ID: <20190805143941.kvbb3ksbgrlb2ch6@MacBook-Pro-91.local> (raw)
In-Reply-To: <da46587e-2471-8971-7c26-6c67720af32d@gmx.com>

On Mon, Aug 05, 2019 at 10:14:15PM +0800, Qu Wenruo wrote:
> 
> 
> On 2019/8/5 下午9:19, 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.
> 
> Still not sure if it's worthy to add a debug only ioctl.
> 
> If sysfs is not good enough, maybe modify btrfs_force_chunk_alloc() to
> do extra chunk allocation depending on a internal return value
> overridable function?
> 
> At least for the later case, we can trigger empty chunk allocation with
> BPF while without messing any interface.

I hadn't thought of the sysfs route, I actually like that a lot better.  Once I
figure out why our debugfs stuff is broken I'll add this in there, that'll save
us a btrfs-progs command as well.  Thanks,

Josef

  reply	other threads:[~2019-08-05 14:39 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
2019-08-05 14:14 ` Qu Wenruo
2019-08-05 14:39   ` Josef Bacik [this message]
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=20190805143941.kvbb3ksbgrlb2ch6@MacBook-Pro-91.local \
    --to=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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;
as well as URLs for NNTP newsgroup(s).