Re: fcntl(2) and other file systems like XFS

From: Stephen C. Tweedie (sct@scot.redhat.com)
Date: Mon Mar 20 2000 - 13:15:01 EST


On Thu, Mar 16, 2000 at 12:05:13PM -0600, Jim Mostek wrote:
>
> If Linux/Linus doesn't want to do this, we should have one file with all
> ioctls. I see that there is /usr/include/bits/ioctls.h and
> /usr/include/asm/ioctls.h. But, ext2's ioctls are in an ext2 specific file:
>
> What should XFS or any other file system do with these? I guess they
> should return EINVAL. What if we accidentally or purposely get called
> with this?

EINVAL is correct. As long as the ioctl() namespace doesn't have conflicts
there won't be a problem (and the _IO* macros are designed to avoid
conflicts as long as you don't use the identity character of an existing
set of drivers).

> I guess the way to fix all this is to make a patch and see if it gets
> accepted. Suggestions?

I'm not sure why you want to fix anything: what is the problem? If you
simply reject ioctls you don't understand when you get called in the fs-
specific ioctl method, what goes wron with the existing mechanisms?

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:30 EST