'Twas brillig, and Lennart Poettering at 25/02/14 13:29 did gyre and gimble: > On Tue, 25.02.14 13:05, Colin Guthrie (gm...@colin.guthr.ie) wrote: > >> >> 'Twas brillig, and Lennart Poettering at 24/02/14 22:08 did gyre and gimble: >>> * systemd will now understand the usual M, K, G, T suffixes >>> according to SI conventions (i.e. to the base 1000) when >>> referring to throughput and hardware metrics. It will stay >>> with IEC conventions (i.e. to the base 1024) for software >>> metrics, according to what is customary according to >>> Wikipedia. We explicitly document which base applies for >>> each configuration option. >> >> It would seem to me that use of upper and lower case suffixes is fairly >> wide-spread (at least in my head) for choosing which base (1000 vs >> 1024). Of course I can't remember which is which, but perhaps using this >> approach would actually be better - and default values can just use >> whichever letter-case they deem appropriate for the use-case. > > Hmm, I thought about something like that, but I thought we'd the ones > inventing it, so I opted not to use that. Do you have some links which > could show that this is a more commonly accepted rule?
Now you're testing me.... I'm convinced I've seen this before, but now that the pressure is on, I cannot think of what projects used that scheme... (all the obvious ones I looked at don't do that: dd, dd_rescue, mke2fs etc. etc. parted sort of does it but uses multiple letters so it's not the same). > Note that in SI "m" is milli, and "M" is mega. Would be fun to store a > couple of millibyte on disk! :) > This new rule we adopted basically results in IEC everywhere with the > exception of a few things like networkd's BitsPerSecond= setting. But > there it should be really obvious that it is SI that is meant, after all > "100Mbit Ethernet" or "Gigabit Ethernet" refer to SI prefixes. That > means the SI vs. IEC should come pretty natural I think for all > technical people the way it is right now. Or to turn this around, which > administrator would expect that setting BitsPerSecond= to 954K is the > right way to go for Gigabit Ethernet? Actually, yeah, thinking about this more, I guess you don't really need to learn the rule at all anyway... I mean doing the expected thing in the expected place should be sufficient and I shouldn't worry about what it means... I guess I may look it up the first time, but then thereafter forget about it and not worry. So after thinking about it a bit, I actually do think it's good how it's done now :) Cheers! Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel