[PATCH v2] btrfs: scrub maintenance event should be recorded in the messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



so to help problem understanding and solving

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
 v2: log shoud be starting instead of started

 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..84801b9 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 starting 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

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux