On Wed, Jun 29, 2011 at 02:00:20PM +0800, Li Zefan wrote: > Hugo Mills wrote: > > @@ -2149,6 +2150,10 @@ int btrfs_balance(struct btrfs_root *dev_root) > > bal_info->completed, bal_info->expected); > > } > > ret = 0; > > + if (bal_info->cancel_pending) { > > + printk(KERN_INFO "btrfs: balance cancelled\n"); > > + ret = -EINTR; > > + } > > Why not detect if there's any pending signal in the while loop? so > we can just use Ctrl+C to cancel balance.
Balance is capable of running in background, you could not send the Ctrl-C to such process. david -- 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