From patchwork Mon Nov 25 10:18:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 3229351 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 45E31C045B for ; Mon, 25 Nov 2013 10:09:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 339C6201FE for ; Mon, 25 Nov 2013 10:09:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81AD0201BE for ; Mon, 25 Nov 2013 10:09:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056Ab3KYKI7 (ORCPT ); Mon, 25 Nov 2013 05:08:59 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:46378 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751280Ab3KYKI6 (ORCPT ); Mon, 25 Nov 2013 05:08:58 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAPA8vGZ022318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Nov 2013 10:08:57 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAPA8u68026645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Nov 2013 10:08:57 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAPA8uew021018 for ; Mon, 25 Nov 2013 10:08:56 GMT Received: from wish.sg.oracle.com (/10.186.101.18) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Nov 2013 02:08:56 -0800 From: Anand Jain 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 Message-Id: <1385374689-3745-1-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.1.164.g2d0029e 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=-6.9 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 | 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;