Re: [PATCH] btrfs-progs: Fix an infinite loop in btrfs_next_bg

2017-07-12 Thread David Sterba
On Fri, Jun 09, 2017 at 11:09:35AM -0700, Justin Maggard wrote: > I've run into a couple filesystems where btrfs-find-root would spin > indefinitely. > > If the first cache extent start location is 0, we end up in an infinite > loop in btrfs_next_bg(). Fix it by checking for that situation, and

[PATCH] btrfs-progs: Fix an infinite loop in btrfs_next_bg

2017-06-09 Thread Justin Maggard
I've run into a couple filesystems where btrfs-find-root would spin indefinitely. If the first cache extent start location is 0, we end up in an infinite loop in btrfs_next_bg(). Fix it by checking for that situation, and jumping to the next bg if necessary. Fixes: e2e0dae9 (btrfs-progs: