From patchwork Mon May 19 17:03:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 4204551 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 360D0BEEAB for ; Mon, 19 May 2014 17:01:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6E8D72015A for ; Mon, 19 May 2014 17:01:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 201522013A for ; Mon, 19 May 2014 17:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932748AbaESRBG (ORCPT ); Mon, 19 May 2014 13:01:06 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:29940 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932536AbaESRA4 (ORCPT ); Mon, 19 May 2014 13:00:56 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s4JH0tYN003980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 19 May 2014 17:00:55 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s4JH0stk013507 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 19 May 2014 17:00:55 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s4JH0rt2009554 for ; Mon, 19 May 2014 17:00:53 GMT Received: from wish.sg.oracle.com (/10.186.101.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 May 2014 10:00:52 -0700 From: Anand Jain To: linux-btrfs@vger.kernel.org Subject: [PATCH 4/4 RESEND] btrfs: scrub maintenance event should be recorded in the messages Date: Tue, 20 May 2014 01:03:42 +0800 Message-Id: <1400519022-5540-4-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400519022-5540-1-git-send-email-anand.jain@oracle.com> References: <1400519022-5540-1-git-send-email-anand.jain@oracle.com> X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP so to help problem understanding and solving Signed-off-by: Anand Jain --- fs/btrfs/ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e174770..ff27c08 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3702,10 +3702,17 @@ static long btrfs_ioctl_scrub(struct file *file, void __user *arg) goto out; } + btrfs_info(root->fs_info, "Scrub started"); + ret = btrfs_scrub_dev(root->fs_info, sa->devid, sa->start, sa->end, &sa->progress, sa->flags & BTRFS_SCRUB_READONLY, 0); + if (ret) + btrfs_info(root->fs_info, "Scrub failed - %d", ret); + else + btrfs_info(root->fs_info, "Scrub finished"); + if (copy_to_user(arg, sa, sizeof(*sa))) ret = -EFAULT;