linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/1] btrfs: add kernel scrub log messages
Date: Mon, 17 Dec 2018 08:39:08 +0200	[thread overview]
Message-ID: <9e245d4b-e198-99d4-95b9-d3b1c3b5e11b@suse.com> (raw)
In-Reply-To: <1545016512-4336-1-git-send-email-anand.jain@oracle.com>



On 17.12.18 г. 5:15 ч., Anand Jain wrote:
> scrub kernel messages helps debug and audit, add them to the log.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
>  fs/btrfs/scrub.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 902819d3cf41..d7a92521019e 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -3876,6 +3876,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
>  	mutex_unlock(&fs_info->scrub_lock);
>  
>  	if (!is_dev_replace) {
> +		btrfs_info(fs_info, "scrub: devid %llu %s", devid, "started");

Perhahps those messages needs to be with btrfs_debug, since they are
only really useful when someone is debugging otherwise we will make
btrfs rather noisy.

>  		/*
>  		 * by holding device list mutex, we can
>  		 * kick off writing super in log tree sync.
> @@ -3897,6 +3898,10 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
>  	if (progress)
>  		memcpy(progress, &sctx->stat, sizeof(*progress));
>  
> +	if (!is_dev_replace)
> +		btrfs_info(fs_info, "scrub: devid %llu %s:%d",
> +			   devid, ret ? "not finished":"finished", ret);
> +
>  	mutex_lock(&fs_info->scrub_lock);
>  	dev->scrub_ctx = NULL;
>  	scrub_workers_put(fs_info);
> 

  reply	other threads:[~2018-12-17  6:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  3:15 [PATCH 1/1] btrfs: add kernel scrub log messages Anand Jain
2018-12-17  6:39 ` Nikolay Borisov [this message]
2018-12-17  6:54   ` Anand Jain
2018-12-17 14:50   ` David Sterba
2019-01-02 17:20 ` David Sterba
2019-01-03  8:18   ` 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=9e245d4b-e198-99d4-95b9-d3b1c3b5e11b@suse.com \
    --to=nborisov@suse.com \
    --cc=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).