From: Liu Bo <bo.li.liu@oracle.com>
To: Stefan Behrens <sbehrens@giantdisaster.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: allow running defrag in parallel to administrative tasks
Date: Tue, 5 Mar 2013 10:51:24 +0800 [thread overview]
Message-ID: <20130305025123.GA18743@liubo.cn.oracle.com> (raw)
In-Reply-To: <1362418118-20277-1-git-send-email-sbehrens@giantdisaster.de>
On Mon, Mar 04, 2013 at 06:28:38PM +0100, Stefan Behrens wrote:
> Commit 5ac00add added a testnset mutex and code that disallows
> running administrative tasks in parallel. It is prevented that
> the device add/delete/balance/replace/resize operations are
> started in parallel. By mistake, the defragmentation operation
> was included in the check for mutually exclusiveness as well.
> This is fixed with this commit.
>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
> ---
> fs/btrfs/ioctl.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index b908960..40631cf 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -2245,13 +2245,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
> if (ret)
> return ret;
>
> - if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running,
> - 1)) {
> - pr_info("btrfs: dev add/delete/balance/replace/resize operation in progress\n");
> - mnt_drop_write_file(file);
> - return -EINVAL;
> - }
> -
> if (btrfs_root_readonly(root)) {
> ret = -EROFS;
> goto out;
> @@ -2306,7 +2299,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
> ret = -EINVAL;
> }
> out:
> - atomic_set(&root->fs_info->mutually_exclusive_operation_running, 0);
> mnt_drop_write_file(file);
> return ret;
> }
> --
> 1.8.1.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-03-05 2:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 17:28 [PATCH] Btrfs: allow running defrag in parallel to administrative tasks Stefan Behrens
2013-03-05 2:51 ` Liu Bo [this message]
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=20130305025123.GA18743@liubo.cn.oracle.com \
--to=bo.li.liu@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sbehrens@giantdisaster.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).