All of lore.kernel.org
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Q on ioctl BLKGETSIZE
Date: Tue, 18 Mar 2014 11:13:38 -0400	[thread overview]
Message-ID: <20140318151338.GA8506@thunk.org> (raw)
In-Reply-To: <53284765020000A100014E30@gwsmtp1.uni-regensburg.de>

On Tue, Mar 18, 2014 at 01:17:25PM +0100, Ulrich Windl wrote:
> 
> Three questions:
> 1) Shouldn't the manual page says that the sector size of always 512 Bytes, even on new disks with larger sectors?
> 2) Should the real sector size be used for new disks?

The HDD industry is using 512 byte logical sectors (so LBA's are in
units of 512 byte sectors), even for disks with a physical sector size
of 4k (and in the next 4-5 years, they would like to go to 32k
physical sector sizes).

> 3) When using 512-bytes sector size, isn't the capacity limited to 2TB (2^31 kB)?

Yes.  That's why we have the BLKGETSIZE64 ioctl.

Example code:

https://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/tree/lib/ext2fs/getsize.c

						- Ted

      reply	other threads:[~2014-03-18 15:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 12:17 Q on ioctl BLKGETSIZE Ulrich Windl
2014-03-18 15:13 ` tytso [this message]

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=20140318151338.GA8506@thunk.org \
    --to=tytso@mit.edu \
    --cc=Ulrich.Windl@rz.uni-regensburg.de \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.