reserve BLKGETSIZE64 ioctl
From: Ben LaHaise <[email protected]>
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.]
Quoted 4 lines · On Mon, 3 Sep 2001 [email protected] wrote:
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.
Yeah, the previous version was actually matching the subject.
Quoted 5 lines
(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.
Where was 110 used? That wasn't mentioned in the last thread.
Quoted 5 lines
(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.
I'd accepted that suggestion, I suppose that it should be added to the comment.
-ben