From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 3/3] btrfs: balance: add kernel log for end or paused
Date: Wed, 16 May 2018 07:25:03 -0400 [thread overview]
Message-ID: <ee980204-dcf3-44ce-8c66-7c82e736c793@gmail.com> (raw)
In-Reply-To: <20180516025128.9899-4-anand.jain@oracle.com>
On 2018-05-15 22:51, Anand Jain wrote:
> Add a kernel log when the balance ends, either for cancel or completed
> or if it is paused.
> ---
> v1->v2: Moved from 2/3 to 3/3
>
> fs/btrfs/volumes.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index ce68c4f42f94..a4e243a29f5c 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4053,6 +4053,13 @@ int btrfs_balance(struct btrfs_fs_info *fs_info,
> ret = __btrfs_balance(fs_info);
>
> mutex_lock(&fs_info->balance_mutex);
> + if (ret == -ECANCELED && atomic_read(&fs_info->balance_pause_req))
> + btrfs_info(fs_info, "balance: paused");
> + else if (ret == -ECANCELED && atomic_read(&fs_info->balance_cancel_req))
> + btrfs_info(fs_info, "balance: canceled");
> + else
> + btrfs_info(fs_info, "balance: ended with status: %d", ret);
> +
> clear_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags);
>
> if (bargs) {
>
Is there some way that these messages could be extended to include info
about which volume the balance in question was on. Ideally, something
that matches up with what's listed in the message from the previous
patch. There's nothi9ng that prevents you from running balances on
separate BTRFS volumes in parallel, so this message won't necessarily be
for the most recent balance start message.
next prev parent reply other threads:[~2018-05-16 11:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 2:51 [PATCH v2 0/3] btrfs: balance: improve kernel logs Anand Jain
2018-05-16 2:51 ` [PATCH v2 1/3] btrfs: balance: prefix " Anand Jain
2018-05-16 7:46 ` Nikolay Borisov
2018-05-17 12:04 ` David Sterba
2018-05-16 2:51 ` [PATCH v2 2/3] btrfs: balance: add args info during start and resume Anand Jain
2018-05-16 7:57 ` Nikolay Borisov
2018-05-16 10:16 ` Anand Jain
2018-05-16 15:09 ` Adam Borowski
2018-05-17 11:59 ` David Sterba
2018-05-21 6:35 ` Anand Jain
2018-05-16 2:51 ` [PATCH v2 3/3] btrfs: balance: add kernel log for end or paused Anand Jain
2018-05-16 7:50 ` Nikolay Borisov
2018-05-16 11:25 ` Austin S. Hemmelgarn [this message]
2018-05-16 13:23 ` Anand Jain
2018-05-16 14:32 ` Austin S. Hemmelgarn
2018-05-17 12:06 ` David Sterba
2018-05-21 6:37 ` 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=ee980204-dcf3-44ce-8c66-7c82e736c793@gmail.com \
--to=ahferroin7@gmail.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 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.