From: Marcin <marcin@mejor.pl>
To: Coly Li <i@coly.li>
Cc: linux-bcache@vger.kernel.org
Subject: Re: [PATCH 4/4] Make output message more human friendly
Date: Fri, 09 Sep 2016 19:49:01 +0200 [thread overview]
Message-ID: <1532ca29e51667feba70d67c30e63d87@mejor.pl> (raw)
In-Reply-To: <feac8c0b-e35a-e309-f30f-66e5cd1af6a6@coly.li>
W dniu 2016-09-09 17:56, Coly Li napisał(a):
> 在 16/9/9 下午9:28, Marcin Mirosław 写道:
>> ---
>> libbcache.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/libbcache.c b/libbcache.c
>> index f17bd4a..3a915e9 100644
>> --- a/libbcache.c
>> +++ b/libbcache.c
>> @@ -200,16 +200,16 @@ void bcache_format(struct dev_opts *devs, size_t
>> nr_devs,
>> "Set UUID: %s\n"
>> "version: %u\n"
>> "nbuckets: %llu\n"
>> - "block_size: %u\n"
>> - "bucket_size: %u\n"
>> + "block_size (bytes): %u\n"
>> + "bucket_size (bytes): %u\n"
>> "nr_in_set: %u\n"
>> "nr_this_dev: %u\n"
>> "first_bucket: %u\n",
>> uuid_str, set_uuid_str,
>> (unsigned) sb->version,
>> __le64_to_cpu(m->nbuckets),
>> - __le16_to_cpu(sb->block_size),
>> - __le16_to_cpu(m->bucket_size),
>> + __le16_to_cpu(sb->block_size)*512,
>> + __le16_to_cpu(m->bucket_size)*512,
>> sb->nr_in_set,
>> sb->nr_this_dev,
>> __le16_to_cpu(m->first_bucket));
>>
> Hi Marcin,
>
> NACK, the out put is content of data structure, it is helpful to debug
> and analyze. If block_size and bucket_size is changed into bytes, in
> many case people have to convert them back to sectors.
>
> I agree this is an issue, I suggest to explain it in manual.
Hi!
You are right, I also hardcoded sector size. Would it be acceptable
change in displayed description without changing values?
+ "block_size (sectors): %u\n"
+ "bucket_size (sectors): %u\n"
I prefer to not write man, my english isn't good enough for it.
Thanks for review.
Marcin
prev parent reply other threads:[~2016-09-09 17:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 12:24 [PATCH] made consistent displayed help and manpage with options acepted by bcache Marcin Mirosław
2016-09-02 12:56 ` [PATCH v2] " Marcin Mirosław
2016-09-04 4:36 ` Kent Overstreet
2016-09-09 13:28 ` [PATCH 1/4] No need to spawn subshell for every source file Marcin Mirosław
2016-09-09 13:28 ` [PATCH 2/4] Make --help and man more consistent Marcin Mirosław
2016-09-09 13:28 ` [PATCH 3/4] Remove unimplemented options from manpage Marcin Mirosław
2016-09-09 13:28 ` [PATCH 4/4] Make output message more human friendly Marcin Mirosław
2016-09-09 15:56 ` Coly Li
2016-09-09 17:49 ` Marcin [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=1532ca29e51667feba70d67c30e63d87@mejor.pl \
--to=marcin@mejor.pl \
--cc=i@coly.li \
--cc=linux-bcache@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).