Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
	Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs-progs: print-tree: Use macro to replace immediate number for readable flags string buffer length
Date: Thu, 22 Mar 2018 22:02:12 +0800	[thread overview]
Message-ID: <fc652775-82a4-6512-0724-e98fc0e68013@gmx.com> (raw)
In-Reply-To: <20180322133927.GZ6955@twin.jikos.cz>


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



On 2018年03月22日 21:39, David Sterba wrote:
> On Thu, Mar 22, 2018 at 10:40:22AM +0200, Nikolay Borisov wrote:
>> On 22.03.2018 10:32, Qu Wenruo wrote:
>>> On 2018年03月22日 16:20, Nikolay Borisov wrote:
>>>> On 22.03.2018 09:37, Qu Wenruo wrote:
>>>>> In print-tree, we have a lot of parsers to convert numeric flags to
>>>>> human readable string.
>>>>>
>>>>> For the buffer size we're using immediate numbers for all their callers.
>>>>> Change this to macro so it will be much easier for us to expand the
>>>>> buffer size.
>>>>>
>>>>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>>>>
>>>> The changes look good per se, however I'd like to have all such macros
>>>> grouped at the beginning of the file - in their own section so to speak.
>>>>
>>>
>>> That's also what I considered.
>>> However this makes stack consumption larger for some callers who don't
>>> really need that much buffer size.
>>
>> I just meant to have the multiple defines you've introduced grouped at
>> the beginning of the file. Not having one define for everyone. This is
>> done purely for aesthetics purposes, though I'm not too hung up on that
>> so if you decide to ignore it, it's fine.
> 
> No, that's actually what I prefer, the first part of header or source is
> for defintions. Unless it's really local to the function or single use.

All right, I'll change the layout.

But leave some comment for each *_flags_to_str() function to info later
contributor what to change.

Thanks,
Qu

> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

      reply	other threads:[~2018-03-22 14:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22  7:37 [PATCH 1/2] btrfs-progs: print-tree: Use macro to replace immediate number for readable flags string buffer length Qu Wenruo
2018-03-22  7:37 ` [PATCH 2/2] btrfs-progs: print-tree: Add output for node flags and backref version Qu Wenruo
2018-03-22  8:22   ` Nikolay Borisov
2018-03-22  8:20 ` [PATCH 1/2] btrfs-progs: print-tree: Use macro to replace immediate number for readable flags string buffer length Nikolay Borisov
2018-03-22  8:32   ` Qu Wenruo
2018-03-22  8:40     ` Nikolay Borisov
2018-03-22 13:39       ` David Sterba
2018-03-22 14:02         ` 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=fc652775-82a4-6512-0724-e98fc0e68013@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    --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