Re: [Patch v2] Btrfs-progs: fix infinite loop in find_free_extent

2017-07-12 Thread David Sterba
On Mon, Jun 26, 2017 at 11:34:41AM -0600, Liu Bo wrote: > If the found %ins is crossing a stripe len, ie. BTRFS_STRIPE_LEN, we'd > search again with a stripe-aligned %search_start. The current code > calculates %search_start by adding a wrong offset, in order to fix it, the > start position of the

[Patch v2] Btrfs-progs: fix infinite loop in find_free_extent

2017-06-26 Thread Liu Bo
If the found %ins is crossing a stripe len, ie. BTRFS_STRIPE_LEN, we'd search again with a stripe-aligned %search_start. The current code calculates %search_start by adding a wrong offset, in order to fix it, the start position of the block group should be taken, otherwise, it'll end up with looki