All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dave@jikos.cz>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Hugo Mills <hugo@carfax.org.uk>,
	Btrfs mailing list <linux-btrfs@vger.kernel.org>,
	Chris Mason <chris.mason@oracle.com>,
	David Sterba <dave@jikos.cz>
Subject: Re: [PATCH v8 2/8] btrfs: Cancel filesystem balance
Date: Wed, 29 Jun 2011 12:43:23 +0200	[thread overview]
Message-ID: <20110629104323.GT12709@twin.jikos.cz> (raw)
In-Reply-To: <4E0ABF74.1070901@cn.fujitsu.com>

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

  reply	other threads:[~2011-06-29 10:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26 20:36 [PATCH v8 0/8] Balance management patches, v8 Hugo Mills
2011-06-26 20:36 ` [PATCH v8 1/8] btrfs: Balance progress monitoring Hugo Mills
2011-06-26 20:36 ` [PATCH v8 2/8] btrfs: Cancel filesystem balance Hugo Mills
2011-06-29  6:00   ` Li Zefan
2011-06-29 10:43     ` David Sterba [this message]
2011-06-26 20:36 ` [PATCH v8 3/8] btrfs: Factor out enumeration of chunks to a separate function Hugo Mills
2011-06-26 20:36 ` [PATCH v8 4/8] btrfs: Implement filtered balance ioctl Hugo Mills
2011-06-26 20:36 ` [PATCH v8 5/8] btrfs: Balance filter for device ID Hugo Mills
2011-06-26 20:36 ` [PATCH v8 6/8] btrfs: Balance filter for virtual address ranges Hugo Mills
2011-06-26 20:36 ` [PATCH v8 7/8] btrfs: Replication-type information Hugo Mills
2011-06-28 16:32   ` David Sterba
2011-06-28 19:26     ` Hugo Mills
2011-06-28 20:41       ` Ilya Dryomov
2011-06-26 20:36 ` [PATCH v8 8/8] btrfs: Balance filter for physical device address Hugo Mills

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110629104323.GT12709@twin.jikos.cz \
    --to=dave@jikos.cz \
    --cc=chris.mason@oracle.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.