public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Simon Arlott <simon@fire.lp0.eu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] scsi/sd: Fix capacity output to show MB/GB/TB/...
Date: Sat, 30 Aug 2008 20:54:12 -0600	[thread overview]
Message-ID: <20080831025412.GJ1239@parisc-linux.org> (raw)
In-Reply-To: <1220147947.3615.18.camel@localhost.localdomain>

On Sat, Aug 30, 2008 at 08:59:07PM -0500, James Bottomley wrote:
> However, I'm afraid it needs to be a bit more sophisticated:  for
> instance, under these calculations, a 1.75TB disk will show up as 1TB.
> Thus, I think we need to print the capacity to 3 significant figures to
> cope with this case.

Do you have an objection to my original suggestion of 1750GB in that
case?  It saves faffing around with fractions and it's unlikely to
confuse the user.

BTW, I do appreciate Simon's point about df showing a different number.
How about we print:

sd 7:0:0:0: [sdc] 1099511627776 512-byte hardware sectors (563TB / 512TiB)

(or perhaps a more realistic number ...)

sd 7:0:0:0: [sdc] 976562500000 512-byte hardware sectors (500TB / 455TiB)

It's perhaps a more gentle way of informing our users that they may not
have quite as much capacity as they thought they had.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-08-31  2:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-30 14:08 [PATCH] scsi/sd: Fix size output in MB Simon Arlott
2008-08-30 17:24 ` James Bottomley
2008-08-30 17:45   ` Matthew Wilcox
2008-08-30 20:59     ` Pierre Ossman
2008-08-30 21:45       ` James Bottomley
2008-08-30 22:13         ` Pierre Ossman
2008-08-30 22:24           ` Simon Arlott
2008-08-30 22:36           ` Matthew Wilcox
2008-08-30 21:02     ` Simon Arlott
2008-08-30 21:03       ` [PATCH] scsi/sd: Fix capacity output to show MB/GB/TB/ Simon Arlott
2008-08-31  1:59         ` James Bottomley
2008-08-31  2:54           ` Matthew Wilcox [this message]
2008-08-31 14:25             ` Ingo Oeser
2008-08-31 15:04               ` Simon Arlott
2008-08-31 15:08             ` James Bottomley
2008-08-31 15:13               ` [PATCH 1/2] lib: add generic helper to print sizes rounded to the correct SI range James Bottomley
2008-08-31 15:20                 ` Simon Arlott
2008-08-31 15:41                   ` James Bottomley
2008-08-31 15:51                 ` Matthew Wilcox
2008-08-31 18:54                 ` [PATCH] mmc_block: use generic helper to print capacities Pierre Ossman
2008-09-05 20:09                   ` James Bottomley
2008-09-05 20:52                     ` Pierre Ossman
2008-09-05 21:03                       ` James Bottomley
2008-09-06  8:57                         ` Pierre Ossman
2008-09-03  3:39                 ` [PATCH 1/2] lib: add generic helper to print sizes rounded to the correct SI range Andrew Morton
2008-09-03 14:32                   ` James Bottomley
2008-09-03 15:58                     ` Andrew Morton
2008-08-31 15:15               ` [PATCH 2/2] sd: use generic helper to print capacities in both binary and SI James Bottomley
2008-08-31 15:08           ` [PATCH] scsi/sd: Fix capacity output to show MB/GB/TB/ Simon Arlott
2008-08-30 21:57       ` [PATCH] scsi/sd: Fix size output in MB Matthew Wilcox
2008-08-30 22:22         ` Simon Arlott
2008-08-31 12:27         ` James Smart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080831025412.GJ1239@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=simon@fire.lp0.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox