On Mon, Jul 23, 2018 at 02:47:29PM +0800, Qu Wenruo wrote:
> In find_free_extent() under checks: tag, we have the following code
>
> ------
> search_start = ALIGN(offset, fs_info->stripesize);
> /* move on to the next group */
> if (search_start + num_bytes >
> block_group->key.objectid + block_group->key.offset) {
> btrfs_add_free_space(block_group, offset, num_bytes);
> goto loop;
> }
> if (offset < search_start)
> btrfs_add_free_space(block_group, offset,
> search_start - offset);
> BUG_ON(offset > search_start);
> ------
>
> However ALIGN() is rounding up, thus @search_start >= @offset and that
> BUG_ON() will never be triggered.
>
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html