Re: [PATCH] blkgetsize64 ioctl

Andries.Brouwer@cwi.nl
Thu, 30 Aug 2001 11:57:31 GMT


From: Ben LaHaise <bcrl@redhat.com>

The patch below reserves an ioctl for getting the size in blocks of a
device as a long long instead of long as the old ioctl did. The patch for
this to e2fsprogs sneaked in a bit too early. There is a conflict with
the ia64 get/set sector ioctls, but I that's less common than e2fsprogs.

+#define BLKGETSIZE64 _IO(0x12,109) /* return device size (long long *arg) */

There are more conflicts with the numbering.

But more interestingly, I don't think we need the size in blocks.
We need the size in bytes.

(In 32-bit space we need the 8 or 9 or 10 bits extra provided by
counting blocks instead of bytes, but it causes quite a few problems.
In 64-bit space we can avoid all problems and work in bytes.
(Or even in bits.))

Andries

-
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/