From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs: scrub maintenance event should be recorded in the messages
Date: Mon, 25 Nov 2013 18:18:09 +0800 [thread overview]
Message-ID: <1385374689-3745-1-git-send-email-anand.jain@oracle.com> (raw)
so to help problem understanding and solving
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/ioctl.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index d237af8..ba980fb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3593,10 +3593,20 @@ static long btrfs_ioctl_scrub(struct file *file, void __user *arg)
goto out;
}
+ printk(KERN_INFO "btrfs: Scrub started on %pU devid %llu\n",
+ root->fs_info->fsid, sa->devid);
+
ret = btrfs_scrub_dev(root->fs_info, sa->devid, sa->start, sa->end,
&sa->progress, sa->flags & BTRFS_SCRUB_READONLY,
0);
+ if (ret)
+ printk(KERN_INFO "btrfs: Scrub failed on %pU devid %llu\n",
+ root->fs_info->fsid, sa->devid);
+ else
+ printk(KERN_INFO "btrfs: Scrub finished on %pU devid %llu\n",
+ root->fs_info->fsid, sa->devid);
+
if (copy_to_user(arg, sa, sizeof(*sa)))
ret = -EFAULT;
--
1.7.1
next reply other threads:[~2013-11-25 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 10:18 Anand Jain [this message]
2013-11-25 11:00 ` [PATCH v2] btrfs: scrub maintenance event should be recorded in the messages Anand Jain
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=1385374689-3745-1-git-send-email-anand.jain@oracle.com \
--to=anand.jain@oracle.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).