On 5.07.19 г. 17:32 ч., Filipe Manana wrote: <snip> > Nikolay, > > The bytes_may_use counter gets decremented once the extent is allocated. > If we were leaking it, we would see a trace when unmounting the > filesystem, and I certainly wouldn't send this patch trading a few > warnings for another one. Right, indeed it's correct but it's far from obvious why. btrfs_prealloc_File_range calls into the allocator (btrfs_reserve_extent) which will convert the bytes_may_use to bytes_reserved which will either call btrfs_free_reserved_data_space or btrfs_free_reserved_extent. So what's left for the callers of btrfs_prealloc_file_range is just the metadata. I think it this is useful information to put in the changelog. > > Thanks. > >> >>> >>> Thanks. >>> >>>> >>>> >>>> >>>> <snip> >>> >
