• Justin Maggard's avatar
    btrfs: qgroup: exit the rescan worker during umount · 7343dd61
    Justin Maggard authored
    I was hitting a consistent NULL pointer dereference during shutdown that
    showed the trace running through end_workqueue_bio().  I traced it back to
    the endio_meta_workers workqueue being poked after it had already been
    destroyed.
    
    Eventually I found that the root cause was a qgroup rescan that was still
    in progress while we were stopping all the btrfs workers.
    
    Currently we explicitly pause balance and scrub operations in
    close_ctree(), but we do nothing to stop the qgroup rescan.  We should
    probably be doing the same for qgroup rescan, but that's a much larger
    change.  This small change is good enough to allow me to unmount without
    crashing.
    Signed-off-by: default avatarJustin Maggard <jmaggard@netgear.com>
    Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
    7343dd61
disk-io.c 120 KB