S.I. and consistent units
Has anyone been working on the consistency problem in LVM wrt units lately (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=306200)? If not i'm willing to come up with a patch that attempts to fix those consistency issues, if patches are welcome.
Signature · 5 lines
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22Quoted 2 lines · Daniel Mierswa
i'm willing to come up with a patch that attempts to fix those consistency issues, if patches are welcome.
So I did although noone gave me the permission yet! :-) Please let me know what you think, any kind of feedback is appreciated. I attached a git format-patch against revision 11f40b. (It's gzip since otherwise the MTA of the list just absorbs my mail without any reply.)
Signature · 5 lines
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22Quoted 7 lines · Daniel Mierswa
Quoted 2 lines · Daniel Mierswa
i'm willing to come up with a patch that attempts to fix those consistency issues, if patches are welcome.
So I did although noone gave me the permission yet! :-) Please let me know what you think, any kind of feedback is appreciated. I attached a git format-patch against revision 11f40b. (It's gzip since otherwise the MTA of the list just absorbs my mail without any reply.)
did not really check all of it, but + {" Exabyte", " EiB", "e"},
+ {" Petabyte", " PiB", "p"},
+ {" Terabyte", " TiB", "t"},
+ {" Gigabyte", " GiB", "g"},
+ {" Megabyte", " MiB", "m"},
+ {" Kilobyte", " KiB", "k"},these units should be named
Exbibyte
Pebibyte
Tebibyte
Gibibyte
Mebibyte
Kibibyte
respectively,
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
Quoted 7 lines · Luca Berra
did not really check all of it, but
(quoted diff) +6
-0+ {" Exabyte", "EiB", "e"}, + {" Petabyte", " PiB", "p"}, + {" Terabyte", " TiB", "t"}, + {" Gigabyte", " GiB", "g"}, + {" Megabyte", " MiB", "m"}, + {" Kilobyte", " KiB", "k"},
Quoted 7 lines
these units should be named
Exbibyte
Pebibyte
Tebibyte
Gibibyte
Mebibyte
Kibibyte
but of course, thank you
new f-p attached
Signature · 5 lines
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22Quoted 22 lines · Luca Berra
Quoted 7 lines · Daniel Mierswa
Quoted 2 lines · Daniel Mierswa
i'm willing to come up with a patch that attempts to fix those consistency issues, if patches are welcome.
So I did although noone gave me the permission yet! :-) Please let me know what you think, any kind of feedback is appreciated. I attached a git format-patch against revision 11f40b. (It's gzip since otherwise the MTA of the list just absorbs my mail without any reply.)
did not really check all of it, but + {" Exabyte", " EiB", "e"},
(quoted diff) +5
-0+ {" Petabyte", " PiB", "p"}, + {" Terabyte", " TiB", "t"}, + {" Gigabyte", " GiB", "g"}, + {" Megabyte", " MiB", "m"}, + {" Kilobyte", " KiB", "k"},these units should be named
Exbibyte
Pebibyte
Tebibyte
Gibibyte
Mebibyte
Kibibyte
Quoted 4 lines
respectively,
L.
Translations obviously needed.....
Firstly, any *functional* changes in the patch need to be identified:
If, given identical data, any code reads in or writes out a different number as a result of the patch we need to consider implications carefully and document that change in release notes.
Secondly, in the man pages, where we list the units, it would be helpful to add a sentence each time to explain the difference between MB and MiB, in terms of multiples of 1000 vs multiples of 1024.
Perhaps lvm.8 could have a paragraph about how LVM2 uses units throughout incl. an external reference to something like
http://physics.nist.gov/cuu/Units/binary.html (or the original standard if you can track that down).
Alasdair
Quoted 8 lines · Daniel Mierswa
Review
Quoted 7 lines · Luca Berra
did not really check all of it, but
(quoted diff) +6
-0+ {" Exabyte", "EiB", "e"}, + {" Petabyte", " PiB", "p"}, + {" Terabyte", " TiB", "t"}, + {" Gigabyte", " GiB", "g"}, + {" Megabyte", " MiB", "m"}, + {" Kilobyte", " KiB", "k"},
You might want to include "YiB" and "ZiB", too, for completeness. Yobibyte, Zebibyte
Quoted 4 lines · Alasdair G Kergon
Firstly, any *functional* changes in the patch need to be identified:
If, given identical data, any code reads in or writes out a different number as a result of the patch we need to consider implications carefully and document that change in release notes.
Agreed. I was just initially wondering if there is any kind of interest in that separation at all. What exactly do you want me to identify now? Do you want me to document the source where functional changes happen, write a summary and attach it to the source or mail? I'm not aware of my task for this. :P
Quoted 3 lines
Secondly, in the man pages, where we list the units, it would be helpful to add a sentence each time to explain the difference between MB and MiB, in terms of multiples of 1000 vs multiples of 1024.
Yes, When writing I always thought that a single place describing the units makes much more sence than to repeat it over and over again. I will definitely fix this once I know what to identify (see above).
Quoted 4 lines
Perhaps lvm.8 could have a paragraph about how LVM2 uses units throughout incl. an external reference to something like
http://physics.nist.gov/cuu/Units/binary.html (or the original standard if you can track that down).
Agreed aswell. The standard is ISO and not available for public viewing online (ISO 80000). I bet we can find right prashing ourselves. :D
Signature · 5 lines
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22Quoted 5 lines · Daniel Mierswa
Agreed. I was just initially wondering if there is any kind of interest in that separation at all. What exactly do you want me to identify now? Do you want me to document the source where functional changes happen, write a summary and attach it to the source or mail? I'm not aware of my task for this. :P
Identify functional changes and mention in email is simplest - the concern is that existing scripts people have could behave differently, so we have to know precisely what changes we are making, assess the impact, and if we decide to proceed nevertheless, we have to document what people need to look for and change in their scripts.
Alasdair
The functional changes are as follows:
- Users and programs currently checking the output of LVM have to distinguish between either IEC or SI units. Currently LVM prints K, KB and Kilobyte for SI and IEC units depending on what they passed in --units. With the patch applied LVM prints K, KB and Kilobyte for SI units and k, KiB and Kibibyte for IEC units.
- Users and programs currently passing LVM the uppercase size suffixes are now telling LVM to treat that value as SI unit whereas now LVM treats lower and uppercase suffixes as IEC (binary based unit).
Consider this as an improved version of my initial patch with the fixes you wanted applied. Let's make another feedback session now. :-)
That's all I can think of now, I'm more than happy to investigate further and react upon your requests and feedback.
Signature · 5 lines
Mierswa, Daniel
If you still don't like it, that's ok: that's why I'm boss. I simply
know better than you do.
--- Linus Torvalds, comp.os.linux.advocacy, 1996/07/22