Re: BLKGETSIZE64 (bytes or sectors?)

Benjamin LaHaise (bcrl@redhat.com)
Thu, 17 Jan 2002 17:47:53 -0500


On Thu, Jan 17, 2002 at 02:28:52PM -0600, Matt Domsch wrote:
> Is the BLKGETSIZE64 ioctl supposed to return the size of the device in
> bytes (as the comment says, and is implemented in all places *except*
> blkpg.c), or in sectors (as is implemented in blkpg.c since 2.4.15)?
>
> It would seem that blkpg.c gets it wrong, that it should be in bytes.
> Assuming that's the case, here's the patch to fix it against 2.4.18-pre4.

blkpg.c is wrong -- the size has to be in bytes in order to support weird
sector sizes.

-ben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/