public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: relocation: Output current relocation stage at btrfs_relocate_block_group()
Date: Fri, 29 Nov 2019 08:35:59 +0800	[thread overview]
Message-ID: <9b43b4be-737e-c119-eab2-ae56cae9e0b3@gmx.com> (raw)
In-Reply-To: <20191128154002.GH2734@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1913 bytes --]



On 2019/11/28 下午11:40, David Sterba wrote:
> On Thu, Nov 28, 2019 at 03:54:36PM +0800, Qu Wenruo wrote:
>> There are several reports of hanging relocation, populating the dmesg
>> with things like:
>>   BTRFS info (device dm-5): found 1 extents
>>
>> The investigation is still on going, but will never hurt to output a
>> little more info.
>>
>> This patch will also output the current relocation stage, making that
>> output something like:
>>
>>   BTRFS info (device dm-5): balance: start -d -m -s
>>   BTRFS info (device dm-5): relocating block group 30408704 flags metadata|dup
>>   BTRFS info (device dm-5): found 2 extents at MOVE_DATA_EXTENT stage
>>   BTRFS info (device dm-5): relocating block group 22020096 flags system|dup
>>   BTRFS info (device dm-5): found 1 extents at MOVE_DATA_EXTENT stage
>>   BTRFS info (device dm-5): relocating block group 13631488 flags data
>>   BTRFS info (device dm-5): found 1 extents at MOVE_DATA_EXTENT stage
>>   BTRFS info (device dm-5): found 1 extents at UPDATE_DATA_PTRS stage
>>   BTRFS info (device dm-5): balance: ended with status: 0
>>
>> The string "MOVE_DATA_EXTENT" and "UPDATE_DATA_PTRS" is mostly from the
>> macro MOVE_DATA_EXTENTS and UPDATE_DATA_PTRS, but the 'S' from
>> MOVE_DATA_EXTENTS is removed in the output string to make the alignment
>> better.
>>
>> This patch will not increase the number of lines, but with extra info
>> for us to debug the reported problem.
> 
> Nice. I'd suggest to make it more user friendly
> 
> 	relocation: found 111 extents, stage: move data blocks
> 	relocation: found 111 extents, stage: update data pointers

This is much better, keeps the indent while provide better readability.

I'll go this way in the next version.

Thanks,
Qu
> 
> The identifier can be understood what it means but it's IMHO not
> important to copy it to the message verbatim.
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-11-29  0:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  7:54 [PATCH] btrfs: relocation: Output current relocation stage at btrfs_relocate_block_group() Qu Wenruo
2019-11-28  7:54 ` Qu Wenruo
2019-11-28 10:50 ` Su Yue
2019-11-28 10:58   ` Qu WenRuo
2019-11-28 15:40 ` David Sterba
2019-11-29  0:35   ` Qu Wenruo [this message]

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=9b43b4be-737e-c119-eab2-ae56cae9e0b3@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /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