Thread (9 messages) 9 messages, 3 authors, 2016-09-09

Re: [PATCH 4/4] Make output message more human friendly

From: Coly Li <hidden>
Date: 2016-09-09 16:48:54

在 16/9/9 下午9:28, Marcin Mirosław 写道:
quoted hunk ↗ jump to hunk
---
 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.

Thanks.

-- 
Coly Li
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help