Re: [PATCH][v3] btrfs: add a force_chunk_alloc to space_info's sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 05, 2019 at 02:31:53PM -0400, Josef Bacik wrote:
> In testing various things such as the btrfsck patch to detect over
> allocation of chunks, empty block group deletion, and balance I've had
> various ways to force chunk allocations for debug purposes.  Add a sysfs
> file to enable forcing of chunk allocation for the owning space info in
> order to enable us to add testcases in the future to test these various
> features easier.
> 
> Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
> ---
> v2->v3:
> - as per Qu's suggestion, moved this to sysfs where it's easier to mess with and
>   makes more sense.
> - added side-effect is mixed bg forced allocation works with this scheme as
>   well.
> - had to add get_btrfs_kobj() to get to fs_info, not sure this is better than
>   just adding the fs_info to the space_info, am open to other opinions here.

I believe v3 is the latest version, but I don't see the new file being
added to the debug/ directory (ie. /sys/fs/btrfs/UUID/debug/)

As it has been discussed, whether to make the file always visible or
only with CONFIG_BTRFS_DEBUG, I'd rather keep it debugging-only. The
testing coverage should be sufficient for fstests that are run with the
config option and not giving users a knob to paper over allocator
problems sounds desirable.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux