[LWN Logo]
[LWN.net]
From:	 Michael E Brown <michael_e_brown@dell.com>
To:	 Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] blkgetsize64 ioctl
Date:	 Thu, 30 Aug 2001 14:10:42 -0500 (CDT)
Cc:	 <tytso@mit.edu>, <bcrl@redhat.com>, <linux-kernel@vger.kernel.org>

Alan,
	Here is a patch that reserves the 108 and 109 ioctl numbers for
get/set last sector. This patch has already been merged into the ia64
tree, and is currently necessary in order to support the EFI GPT
partitioning scheme on ia64. It is also in the Red Hat kernel tree. I had
assumed that somebody at Red Hat would have forwarded it to you.

	Please apply.

	If you would consider the rest of the patch that implements the
ioctls, I can send you that as well.
--
Michael


On Thu, 30 Aug 2001, Alan Cox wrote:

> > On Thu, Aug 30, 2001 at 01:12:07PM -0400, Ben LaHaise wrote:
> > > No, that's not what's got me miffed.  What is a problem here is that an
> > > obvious next to use ioctl number in a *CORE* kernel api was used without
> > > reserving it.  AND PEOPLE SHIPPED IT!  I for one don't go about shipping
> > > new ABIs without reserving at least a placeholder for it in the main
> > > kernel (or stating that the code is not bearing a fixed ABI).  If the
> > > ioctl # was in the main kernel, this mess would never have happened even
> > > with the accidental shipping of the patch in e2fsprogs.
> >
> > ... and for my part, I included the patch in e2fsprogs because Ben
> > sent me the patch, saying that people would want to test it, and I
> > assumed he had already reserved the ioctl in the kernel.  I should
> > have checked first....
>
> Follow the rule I use with Linus - never send proposed changes you dont
> mean to be merged in a compilable form
>
> On this subject I think it would be good to get the security() syscall
> allocated now that folks are using the LSM framework for real stuff - even
> the NSA stuff
>
> Alan
>

-- 
Michael Brown
Linux OS Development
Dell Computer Corp

  If each of us have one object, and we exchange them,
     then each of us still has one object.
  If each of us have one idea,   and we exchange them,
     then each of us now has two ideas.


diff -ruP linux/include/linux/fs.h linux-ioctl/include/linux/fs.h
--- linux/include/linux/fs.h	Tue Jan 30 01:24:56 2001
+++ linux-ioctl/include/linux/fs.h	Tue Feb 13 11:08:43 2001
@@ -180,6 +180,8 @@
 /* This was here just to show that the number is taken -
    probably all these _IO(0x12,*) ioctls should be moved to blkpg.h. */
 #endif
+#define BLKGETLASTSECT  _IO(0x12,108) /* get last sector of block device */
+#define BLKSETLASTSECT  _IO(0x12,109) /* get last sector of block device */
 
 
 #define BMAP_IOCTL 1		/* obsolete - kept for compatibility */