Thread (3 messages) 3 messages, 2 authors, 2021-06-08

Re: [PATCH] btrfs-progs: device: print num_stripes in usage command

From: Sidong Yang <hidden>
Date: 2021-06-08 14:46:48

On Mon, Jun 07, 2021 at 09:20:49PM +0200, David Sterba wrote:
On Sun, May 30, 2021 at 12:56:36PM +0000, Sidong Yang wrote:
quoted
This patch appends num_stripes for each chunks in device usage commands.
It helps to see profiles easily. The output is like below.

/dev/vdb, ID: 1
   Device size:             1.00GiB
   Device slack:              0.00B
   Data,single[1]:        120.00MiB
   Metadata,DUP[2]:       102.38MiB
   System,DUP[2]:          16.00MiB
   Unallocated:           785.62MiB
Hi David. Thanks for review!
This is example of single and dup, but the whole point was to print that
for the striped profiles, like is shown in the issue
https://github.com/kdave/btrfs-progs/issues/372 , so it needs to be
conditional.
Okay, striped profiles need to be printed. I read some page from
wikipedia about raid. and I got that RAID 0,5,6,10 supports striping.
Those need to be printed and no printing for RAID 1, single, dup.
As the mirrored profiles have a fixed number of copies, there's no doubt
on how many devices are printed, same for single and dup.

I'm more inclined to use the "/" as separator: 'RAID6/3' it's more like
"raid6 on three devices", the "[]" looks like indexing. "," is used as
separator of the type so it won't be as simple to parse that.
I agree. I'll use "/" for next version.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help