FAQ entry for loopback mounting

Jörn Engel joern at wohnheim.fh-wedel.de
Wed Apr 5 15:05:25 EDT 2006


On Wed, 5 April 2006 13:36:56 -0400, Ralph Siemsen wrote:
> David Woodhouse wrote:
> 
> >We _are_ being lenient. If you say 'k' or 'M' instead of 'Ki' or 'Mi'
> >then you are going to get the powers of ten which you asked for... which
> >is almost certainly _not_ what you wanted. Giving you powers of two is
> >not an option. So it's best not to accept it at all.
> 
> No, if you give it "k" only, then it multiples by 1024, but because 
> there is no "i", it does not advance *endp, and then parse_num() returns 
> -EINVAL because it sees trailing garbage.  So just "k" is not accepted 
> at all, which is not "leniant" in my books.

Well, we have the following options:
1) accept "k" only, interpret as 1024
2) accept both "k" and "ki", interpret as 1024
3) accept "k" and interpret as 1000, accept "ki" and interpret as 1024
4) accept "ki" only, interpret as 1024

Option 1 is what has been done by every piece of software for years.
People are used to it.  But it also causes confusion at time.  For
example, my 40GB hard disk is only 37GiB in size.  Hard disk
manufacturers _do_ mean 1000*1000*1000 when talking about GB.  DRAM
manufacturers mean 1024*1024*1024 when talking about GB.  GBit
ethernet means 1000MBit.  10MBit might mean 10*1024*1024, not sure
about that.

Ergo: It is confusing, don't do it.


Option 2 has all the disadvantages of 1.

Ergo: It is confusing, don't do it.


Option 3 will cause many people to expect "k" to be interpreted as
1024, while something completely different happens.

Ergo: It is confusing, don't do it.


Option 4 simply doesn't accept "k".  People used to it will have to
stop and think, then notice that it is called "ki" now and definitely
means 1024, even when talking about hard disks, ethernet, etc.

Ergo: Initial surprise, but after that the interface does what one
expects.


I personally don't like solution 4 too much either.  But it is much
better than the other three.  And the "but this is flash, so in this
particular case everyone knows it means 1024" argument simply doesn't
work.  If you look at the FAQ section of your favorite computer
magazine, you see the "why is my 40GB hard disk only 37GiB in size"
question in it.  People don't know when "k" means 1000 and when it
means 1024.

If you have a better solution, though, I'm all yours. ;)

Jörn

-- 
I've never met a human being who would want to read 17,000 pages of
documentation, and if there was, I'd kill him to get him out of the
gene pool.
-- Joseph Costello




More information about the linux-mtd mailing list