Linux-bcache Archive mirror
 help / color / mirror / Atom feed
From: 邹明哲 <mingzhe.zou@easystack.cn>
To: colyli <colyli@suse.de>, linux-bcache@vger.kernel.org
Subject: Re:[PATCH] bcache: improve bch_hprint() output
Date: Mon, 9 Jan 2023 14:39:03 +0800 (GMT+08:00)	[thread overview]
Message-ID: <AMYARABzI4pRI7BguO2NtKo2.2.1673246343472.Hmail.mingzhe.zou@easystack.cn> (raw)
In-Reply-To: <20221008085630.8321-1-mingzhe.zou@easystack.cn>

Hi Coly

This is a simple fix. And when use numfmt, we will get error.

mingzhe


From: mingzhe.zou@easystack.cn
Date: 2022-10-08 16:56:30
To:  colyli@suse.de,linux-bcache@vger.kernel.org
Cc:  zoumingzhe@qq.com
Subject: [PATCH] bcache: improve bch_hprint() output>From: mingzhe <mingzhe.zou@easystack.cn>
>
>The current suffix of bch_hprint() uses the SI (The International System of Units)
>standard. In the SI brochure, the symbol for the kilo prefix is k instead of K.
>Because K is the symbol for the thermodynamic temperature unit kelvin.
>
>In fact, SI is based on decimal not binary. However, bch_hprint() is binary based,
>so it should conform to the IEC 60027-2 (Letter symbols to be used in electrical
>technology - Part 2: Telecommunications and electronics) standard.
>
>Signed-off-by: mingzhe <mingzhe.zou@easystack.cn>
>---
> drivers/md/bcache/util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/md/bcache/util.c b/drivers/md/bcache/util.c
>index ae380bc3992e..91ab36ec2deb 100644
>--- a/drivers/md/bcache/util.c
>+++ b/drivers/md/bcache/util.c
>@@ -91,7 +91,7 @@ STRTO_H(strtoull, unsigned long long)
>  */
> ssize_t bch_hprint(char *buf, int64_t v)
> {
>-	static const char units[] = "?kMGTPEZY";
>+	static const char units[] = "?KMGTPEZY";
> 	int u = 0, t;
> 
> 	uint64_t q;
>-- 
>2.17.1
>



      reply	other threads:[~2023-01-09  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-08  8:56 [PATCH] bcache: improve bch_hprint() output mingzhe.zou
2023-01-09  6:39 ` 邹明哲 [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=AMYARABzI4pRI7BguO2NtKo2.2.1673246343472.Hmail.mingzhe.zou@easystack.cn \
    --to=mingzhe.zou@easystack.cn \
    --cc=colyli@suse.de \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).