From: Jeff Mahoney Date: Mon, 15 Jun 2015 13:41:18 +0000 (-0400) Subject: btrfs: explictly delete unused block groups in close_ctree and ro-remount X-Git-Tag: omap-for-v4.3/fixes-rc1~86^2~7^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e44163e177960ee60e32a73bffdd53c3a5827406;p=pandora-kernel.git btrfs: explictly delete unused block groups in close_ctree and ro-remount The cleaner thread may already be sleeping by the time we enter close_ctree. If that's the case, we'll skip removing any unused block groups queued for removal, even during a normal umount. They'll be cleaned up automatically at next mount, but users expect a umount to be a clean synchronization point, especially when used on thin-provisioned storage with -odiscard. We also explicitly remove unused block groups in the ro-remount path for the same reason. Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana Tested-by: Filipe Manana Signed-off-by: Chris Mason --- Reading git-diff-tree failed