The patchset can be fetched from github: https://github.com/adam900710/linux/tree/delayed_bg_removal
It's based on David's misc-next branch, HEAD is: commit c77a75861d82a497bd1a26054588cd9af59eb5db (david/misc-next) Author: Ethan Lien <ethanl...@synology.com> Date: Mon May 28 13:48:20 2018 +0800 btrfs: balance dirty metadata pages in btrfs_finish_ordered_io This bug is reported from SUSE openQA, although it's pretty hard to hit in real world (even real world VM), it's believed block group auto removal (anyway, there isn't much thing can remove a chunk mapping in btrfs) could interfere with qgroup's search on commit root. Full details can be found in the 2rd patch. The patchset uses 1 submitted cleanup/refactor patches as basis, and the 2nd patch will ensure unused block group will only be deleted after current transaction is done. Qu Wenruo (2): btrfs: Use btrfs_mark_bg_unused() to replace open code btrfs: Delayed empty block group auto removal to next transaction fs/btrfs/ctree.h | 2 ++ fs/btrfs/extent-tree.c | 62 +++++++++++++++++++++++++++++------------- fs/btrfs/scrub.c | 9 +----- fs/btrfs/transaction.c | 7 +++++ fs/btrfs/transaction.h | 10 +++++++ 5 files changed, 63 insertions(+), 27 deletions(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html