On Tue, Jan 21, 2020 at 09:17:06AM -0500, Josef Bacik wrote: > Sometimes when running generic/475 we would trip the > WARN_ON(cache->reserved) check when free'ing the block groups on umount. > This is because sometimes we don't commit the transaction because of IO > errors and thus do not cleanup the tree logs until at umount time. > These blocks are still reserved until they are cleaned up, but they > aren't cleaned up until _after_ we do the free block groups work. Fix > this by moving the free after free'ing the fs roots, that way all of the > tree logs are cleaned up and we have a properly cleaned fs. A bunch of > loops of generic/475 confirmed this fixes the problem. > > Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx> > --- > v1->v2: > - Add a comment to make sure we don't re-order the block group freeing. Thanks, added to misc-next.
