Re: BLKGETSIZE64 (bytes or sectors?)

From: Benjamin LaHaise (bcrl@redhat.com)
Date: Thu Jan 17 2002 - 17:47:53 EST


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/



This archive was generated by hypermail 2b29 : Wed Jan 23 2002 - 21:00:23 EST