• Josef Bacik's avatar
    Btrfs: stop all workers after we free block groups · 96192499
    Josef Bacik authored
    Stefan was hitting a panic in the async worker stuff because we had outstanding
    read bios while we were stopping the worker threads.  You could reproduce this
    easily if you mount -o nospace_cache and ran generic/273.  This is because the
    caching thread stuff is still going and we were stopping all the worker threads.
    We need to stop the workers after this work is done, and the free block groups
    code will wait for all the caching threads to stop first so we don't run into
    this problem.  With this patch we no longer panic.  Thanks,
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
    96192499
disk-io.c 112 KB