From: Miao Xie <miaox@cn.fujitsu.com>
To: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH 4/5] Btrfs: cancel the scrub when remounting a fs to ro
Date: Thu, 17 May 2012 19:58:21 +0800 [thread overview]
Message-ID: <4FB4E7DD.8020802@cn.fujitsu.com> (raw)
If the filesystem is mounted to readonly, we should not run scrub.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
---
fs/btrfs/super.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index ea17f0a..817b3a7 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1151,6 +1151,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
/* pause restriper - we want to resume on remount to r/w */
btrfs_pause_balance(root->fs_info);
+ btrfs_scrub_cancel(root);
+
ret = btrfs_commit_super(root);
if (ret)
goto restore;
--
1.7.6.5
next reply other threads:[~2012-05-17 11:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 11:58 Miao Xie [this message]
2012-05-18 12:52 ` [PATCH 4/5] Btrfs: cancel the scrub when remounting a fs to ro David Sterba
2012-05-21 5:34 ` Miao Xie
2012-05-21 10:29 ` Stefan Behrens
2012-05-21 10:29 ` Arne Jansen
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=4FB4E7DD.8020802@cn.fujitsu.com \
--to=miaox@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
/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).