On Sünndag 06 November 2005 05:39, Christoph Hellwig wrote: > NACK, this is completely idiotic. Duplicating handlers is the very > last thing we want. I actually have patches to move handling some > of those ioctls into generic code, but that's a different story. Ok, I'll drop this patch then, except for the ext3 parts that fix an actual problem of missing conversion handlers. What is your opinion on the xfs bit. The current code is somewhat broken, since XFS_IOC_{GET,SET}{VERSION,XFLAGS} are not really compatible. Should those three lines simply be removed? Arnd <>< --- linux-cg.orig/fs/xfs/linux-2.6/xfs_ioctl32.c 2005-11-05 02:44:55.000000000 +0100 +++ linux-cg/fs/xfs/linux-2.6/xfs_ioctl32.c 2005-11-05 02:45:35.000000000 +0100 @@ -34,6 +34,11 @@ #define _NATIVE_IOC(cmd, type) \ _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) +/* broken ext2 ioctl numbers */ +#define XFS_IOC_GETVERSION32 _IOR('v', 1, int) +#define XFS_IOC_GETXFLAGS32 _IOR('f', 1, int) +#define XFS_IOC_SETXFLAGS32 _IOW('f', 2, int) + #if defined(CONFIG_IA64) || defined(CONFIG_X86_64) #define BROKEN_X86_ALIGNMENT /* on ia32 l_start is on a 32-bit boundary */ @@ -115,12 +120,16 @@ vnode_t *vp = LINVFS_GET_VP(inode); switch (cmd) { + /* these take an int as their argument, not a long */ + case XFS_IOC_GETVERSION32: + case XFS_IOC_GETXFLAGS32: + case XFS_IOC_SETXFLAGS32: + cmd = _NATIVE_IOC(cmd, long); + break; + case XFS_IOC_DIOINFO: case XFS_IOC_FSGEOMETRY_V1: case XFS_IOC_FSGEOMETRY: - case XFS_IOC_GETVERSION: - case XFS_IOC_GETXFLAGS: - case XFS_IOC_SETXFLAGS: case XFS_IOC_FSGETXATTR: case XFS_IOC_FSSETXATTR: case XFS_IOC_FSGETXATTRA: _______________________________________________ Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users