[PATCH] Btrfs-progs: fix infinite loop in find_free_extent

2017-06-23 Thread Liu Bo
From: Liu Bo %search_start is calculated in a wrong way, and if %ins is a cross-stripe one, it'll search the same block group forever. Signed-off-by: Liu Bo --- extent-tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extent-tree.c b/extent-tree.c index b12ee29..

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

2017-06-26 Thread David Sterba
On Fri, Jun 23, 2017 at 10:28:31PM -0600, Liu Bo wrote: > From: Liu Bo > > %search_start is calculated in a wrong way, and if %ins is a cross-stripe > one, it'll search the same block group forever. That's a bit terse description, so please check if my understanding is right: search_start advan

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

2017-06-26 Thread Liu Bo
On Mon, Jun 26, 2017 at 04:09:53PM +0200, David Sterba wrote: > On Fri, Jun 23, 2017 at 10:28:31PM -0600, Liu Bo wrote: > > From: Liu Bo Ah, my From was broken again. > > > > %search_start is calculated in a wrong way, and if %ins is a cross-stripe > > one, it'll search the same block group fo

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

2017-06-26 Thread Qu Wenruo
At 06/27/2017 02:02 AM, Liu Bo wrote: On Mon, Jun 26, 2017 at 04:09:53PM +0200, David Sterba wrote: On Fri, Jun 23, 2017 at 10:28:31PM -0600, Liu Bo wrote: From: Liu Bo Ah, my From was broken again. %search_start is calculated in a wrong way, and if %ins is a cross-stripe one, it'll s