Re: [resend PATCH] reserve BLKGETSIZE64 ioctl

Andries.Brouwer@cwi.nl
Mon, 3 Sep 2001 20:57:29 GMT


From: Ben LaHaise <bcrl@redhat.com>

Is there any problem with the patch below for reserving a 64 bit get block
device size ioctl?

+#define BLKBSZGET _IOR(0x12,110,sizeof(u64))
#define BLKBSZGET _IOR(0x12,112,sizeof(int))

Yes.

(1) As you can see you'll only get redefinition complaints.
In other words, there is a B too much in the ioctl name.

(2) We just concluded that 108-111 have been used for various
private purposes. If we avoid 108-111 in all official kernels
then nobody will be surprised if he ever uses some system
utility that uses one of these.
Thus, it is a very bad idea to want to use these again.

(3) Soon we'll all need a BLKGETSIZE64 ioctl, that gives
the size of a block device in bytes. Your proposed ioctl
gave the size in blocks if I recall correctly.
So, if you have to change the name and the number,
you might as well change the definition.

Andries

[We might reserve an area for private use - some ioctl numbers
that are guaranteed never to become part of an official kernel.]

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