Loading fs/xfs/linux-2.6/xfs_ioctl.c +22 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,8 @@ xfs_ioctl( case XFS_IOC_GETVERSION: case XFS_IOC_GETXFLAGS: case XFS_IOC_SETXFLAGS: case XFS_IOC_GETPROJID: case XFS_IOC_SETPROJID: case XFS_IOC_FSGETXATTR: case XFS_IOC_FSSETXATTR: case XFS_IOC_FSGETXATTRA: Loading Loading @@ -1258,6 +1260,26 @@ xfs_ioc_xattr( return 0; } case XFS_IOC_GETPROJID: { va.va_mask = XFS_AT_PROJID; VOP_GETATTR(vp, &va, 0, NULL, error); if (error) return -error; if (copy_to_user(arg, &va.va_projid, sizeof(va.va_projid))) return -XFS_ERROR(EFAULT); return 0; } case XFS_IOC_SETPROJID: { if (!capable(CAP_SYS_ADMIN)) return -EPERM; va.va_mask = XFS_AT_PROJID; if (copy_from_user(&va.va_projid, arg, sizeof(va.va_projid))) return -XFS_ERROR(EFAULT); VOP_SETATTR(vp, &va, 0, NULL, error); return -error; } default: return -ENOTTY; } Loading fs/xfs/linux-2.6/xfs_ioctl32.c +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ __linvfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) case XFS_IOC_GETBMAP: case XFS_IOC_GETBMAPA: case XFS_IOC_GETBMAPX: case XFS_IOC_SETPROJID: case XFS_IOC_GETPROJID: /* not handled case XFS_IOC_FD_TO_HANDLE: case XFS_IOC_PATH_TO_HANDLE: Loading fs/xfs/linux-2.6/xfs_vnode.h +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ typedef struct vattr { u_long va_extsize; /* file extent size */ u_long va_nextents; /* number of extents in file */ u_long va_anextents; /* number of attr extents in file */ int va_projid; /* project id */ prid_t va_projid; /* project id */ } vattr_t; /* Loading fs/xfs/xfs_fs.h +2 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,8 @@ typedef struct xfs_handle { /* XFS_IOC_SETBIOSIZE ---- deprecated 46 */ /* XFS_IOC_GETBIOSIZE ---- deprecated 47 */ #define XFS_IOC_GETBMAPX _IOWR('X', 56, struct getbmap) #define XFS_IOC_SETPROJID _IOWR('X', 57, __uint32_t) #define XFS_IOC_GETPROJID _IOWR('X', 58, __uint32_t) /* * ioctl commands that replace IRIX syssgi()'s Loading fs/xfs/xfs_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ typedef signed long long int __int64_t; typedef unsigned long long int __uint64_t; typedef enum { B_FALSE,B_TRUE } boolean_t; typedef __int64_t prid_t; /* project ID */ typedef __uint32_t prid_t; /* project ID */ typedef __uint32_t inst_t; /* an instruction */ typedef __s64 xfs_off_t; /* <file offset> type */ Loading Loading
fs/xfs/linux-2.6/xfs_ioctl.c +22 −0 Original line number Diff line number Diff line Loading @@ -777,6 +777,8 @@ xfs_ioctl( case XFS_IOC_GETVERSION: case XFS_IOC_GETXFLAGS: case XFS_IOC_SETXFLAGS: case XFS_IOC_GETPROJID: case XFS_IOC_SETPROJID: case XFS_IOC_FSGETXATTR: case XFS_IOC_FSSETXATTR: case XFS_IOC_FSGETXATTRA: Loading Loading @@ -1258,6 +1260,26 @@ xfs_ioc_xattr( return 0; } case XFS_IOC_GETPROJID: { va.va_mask = XFS_AT_PROJID; VOP_GETATTR(vp, &va, 0, NULL, error); if (error) return -error; if (copy_to_user(arg, &va.va_projid, sizeof(va.va_projid))) return -XFS_ERROR(EFAULT); return 0; } case XFS_IOC_SETPROJID: { if (!capable(CAP_SYS_ADMIN)) return -EPERM; va.va_mask = XFS_AT_PROJID; if (copy_from_user(&va.va_projid, arg, sizeof(va.va_projid))) return -XFS_ERROR(EFAULT); VOP_SETATTR(vp, &va, 0, NULL, error); return -error; } default: return -ENOTTY; } Loading
fs/xfs/linux-2.6/xfs_ioctl32.c +2 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,8 @@ __linvfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) case XFS_IOC_GETBMAP: case XFS_IOC_GETBMAPA: case XFS_IOC_GETBMAPX: case XFS_IOC_SETPROJID: case XFS_IOC_GETPROJID: /* not handled case XFS_IOC_FD_TO_HANDLE: case XFS_IOC_PATH_TO_HANDLE: Loading
fs/xfs/linux-2.6/xfs_vnode.h +1 −1 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ typedef struct vattr { u_long va_extsize; /* file extent size */ u_long va_nextents; /* number of extents in file */ u_long va_anextents; /* number of attr extents in file */ int va_projid; /* project id */ prid_t va_projid; /* project id */ } vattr_t; /* Loading
fs/xfs/xfs_fs.h +2 −0 Original line number Diff line number Diff line Loading @@ -477,6 +477,8 @@ typedef struct xfs_handle { /* XFS_IOC_SETBIOSIZE ---- deprecated 46 */ /* XFS_IOC_GETBIOSIZE ---- deprecated 47 */ #define XFS_IOC_GETBMAPX _IOWR('X', 56, struct getbmap) #define XFS_IOC_SETPROJID _IOWR('X', 57, __uint32_t) #define XFS_IOC_GETPROJID _IOWR('X', 58, __uint32_t) /* * ioctl commands that replace IRIX syssgi()'s Loading
fs/xfs/xfs_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ typedef signed long long int __int64_t; typedef unsigned long long int __uint64_t; typedef enum { B_FALSE,B_TRUE } boolean_t; typedef __int64_t prid_t; /* project ID */ typedef __uint32_t prid_t; /* project ID */ typedef __uint32_t inst_t; /* an instruction */ typedef __s64 xfs_off_t; /* <file offset> type */ Loading