lkml.org 
[lkml]   [2014]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectQ on ioctl BLKGETSIZE
Hi!

I'm wondering (on a x86_64 SLES11 system):

"man 4 sd" says:
---
BLKGETSIZE
Returns the device size in sectors. The ioctl(2) parameter
should be a pointer to a long.
---

/usr/src/linux/block/ioctl.c (3.0.101-0.15) reads:
---
case BLKGETSIZE:
size = i_size_read(bdev->bd_inode);
if ((size >> 9) > ~0UL)
return -EFBIG;
return put_ulong(arg, size >> 9);
---

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

I'm not subscribed to LKML, so please keep me CC'd when answering.

Regards,
Ulrich




\
 
 \ /
  Last update: 2014-03-18 14:01    [W:0.033 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site