All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: add kernel scrub log messages
Date: Thu, 24 Jan 2019 21:21:13 +0100	[thread overview]
Message-ID: <20190124202112.GB2900@twin.jikos.cz> (raw)
In-Reply-To: <1546503460-3183-1-git-send-email-anand.jain@oracle.com>

On Thu, Jan 03, 2019 at 04:17:40PM +0800, Anand Jain wrote:
> scrub kernel messages helps debug and audit, add them to the log.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> v1->v2: fix btrfs_info, using string directly. Add spacing.

>  fs/btrfs/scrub.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 6dcd36d7b849..aadafc3e52c7 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -3903,6 +3903,7 @@ int btrfs_scrub_dev(struct btrfs_fs_info *fs_info, u64 devid, u64 start,
>  	 */
>  	nofs_flag = memalloc_nofs_save();
>  	if (!is_dev_replace) {
> +		btrfs_info(fs_info, "scrub: devid %llu started", devid);
>  		/*
>  		 * by holding device list mutex, we can
>  		 * kick off writing super in log tree sync.
> @@ -3925,6 +3926,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);

I've checked how the balance status messages are formatted and unified
them so it's

+		btrfs_info(fs_info, "scrub: started on devid %llu", devid);

and

+               btrfs_info(fs_info, "scrub: %s on devid %llu with status: %d",
+                       ret ? "not finished" : "finished", devid, ret);

Patch added to misc-next, thanks.

  parent reply	other threads:[~2019-01-24 20:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03  8:17 [PATCH v2] btrfs: add kernel scrub log messages Anand Jain
2019-01-11  3:43 ` Anand Jain
2019-01-24 20:21 ` David Sterba [this message]
2019-01-24 22:30   ` 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=20190124202112.GB2900@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.