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 <jo...@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 via email to