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 v2] btrfs-progs: Make "btrfs filesystem df" command to show upper case profile
Date: Wed, 3 Nov 2021 07:24:22 +0800	[thread overview]
Message-ID: <a79daa40-b36e-c7db-da31-527c05f5954f@gmx.com> (raw)
In-Reply-To: <20211102141236.GI20319@twin.jikos.cz>



On 2021/11/2 22:12, David Sterba wrote:
> On Tue, Nov 02, 2021 at 08:06:37PM +0800, Qu Wenruo wrote:
>> [BUG]
>> Since commit dad03fac3bb8 ("btrfs-progs: switch btrfs_group_profile_str
>> to use raid table"), fstests/btrfs/023 and btrfs/151 will always fail.
>>
>> The failure of btrfs/151 explains the reason pretty well:
>>
>> btrfs/151 1s ... - output mismatch
>>      --- tests/btrfs/151.out	2019-10-22 15:18:14.068965341 +0800
>>      +++ ~/xfstests-dev/results//btrfs/151.out.bad	2021-11-02 17:13:43.879999994 +0800
>>      @@ -1,2 +1,2 @@
>>       QA output created by 151
>>      -Data, RAID1
>>      +Data, raid1
>>      ...
>>      (Run 'diff -u ~/xfstests-dev/tests/btrfs/151.out ~/xfstests-dev/results//btrfs/151.out.bad'  to see the entire diff)
>>
>> [CAUSE]
>> Commit dad03fac3bb8 ("btrfs-progs: switch btrfs_group_profile_str to use
>> raid table") will use btrfs_raid_array[index].raid_name, which is all
>> lower case.
>>
>> [FIX]
>> There is no need to bring such output format change.
>
> Well, indeed, I thought it won't be such a problem. If we want to have
> the upper case version, it could be better to add another string to the
> raid table. It is a bit of duplication but it would be easier to avoid
> the temporary buffers whenever it's printed. For kernel we don't need
> that but progs print the profiles a lot.
>
That's also an alternative way I'm trying to go, but don't want to bring
duplication in the raid table.

Let me try to find a better way, like doing it using macros at
initialization time.

Thanks,
Qu

  reply	other threads:[~2021-11-02 23:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 12:06 [PATCH v2] btrfs-progs: Make "btrfs filesystem df" command to show upper case profile Qu Wenruo
2021-11-02 14:12 ` David Sterba
2021-11-02 23:24   ` Qu Wenruo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-04  1:58 Qu Wenruo
2021-11-04 12:17 ` Nikolay Borisov
2021-11-04 12:45 ` David Sterba
2021-11-04 14:30   ` David Sterba

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=a79daa40-b36e-c7db-da31-527c05f5954f@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