| .. | .. |
|---|
| 13 | 13 | */ |
|---|
| 14 | 14 | |
|---|
| 15 | 15 | struct xfs_trans; |
|---|
| 16 | +struct xfs_buf; |
|---|
| 16 | 17 | |
|---|
| 17 | 18 | /* |
|---|
| 18 | 19 | * This check is done typically without holding the inode lock; |
|---|
| .. | .. |
|---|
| 38 | 39 | |
|---|
| 39 | 40 | static inline uint |
|---|
| 40 | 41 | xfs_quota_chkd_flag( |
|---|
| 41 | | - uint dqtype) |
|---|
| 42 | + xfs_dqtype_t type) |
|---|
| 42 | 43 | { |
|---|
| 43 | | - switch (dqtype) { |
|---|
| 44 | | - case XFS_DQ_USER: |
|---|
| 44 | + switch (type) { |
|---|
| 45 | + case XFS_DQTYPE_USER: |
|---|
| 45 | 46 | return XFS_UQUOTA_CHKD; |
|---|
| 46 | | - case XFS_DQ_GROUP: |
|---|
| 47 | + case XFS_DQTYPE_GROUP: |
|---|
| 47 | 48 | return XFS_GQUOTA_CHKD; |
|---|
| 48 | | - case XFS_DQ_PROJ: |
|---|
| 49 | + case XFS_DQTYPE_PROJ: |
|---|
| 49 | 50 | return XFS_PQUOTA_CHKD; |
|---|
| 50 | 51 | default: |
|---|
| 51 | 52 | return 0; |
|---|
| .. | .. |
|---|
| 56 | 57 | * The structure kept inside the xfs_trans_t keep track of dquot changes |
|---|
| 57 | 58 | * within a transaction and apply them later. |
|---|
| 58 | 59 | */ |
|---|
| 59 | | -typedef struct xfs_dqtrx { |
|---|
| 60 | +struct xfs_dqtrx { |
|---|
| 60 | 61 | struct xfs_dquot *qt_dquot; /* the dquot this refers to */ |
|---|
| 61 | | - ulong qt_blk_res; /* blks reserved on a dquot */ |
|---|
| 62 | | - ulong qt_ino_res; /* inode reserved on a dquot */ |
|---|
| 63 | | - ulong qt_ino_res_used; /* inodes used from the reservation */ |
|---|
| 64 | | - long qt_bcount_delta; /* dquot blk count changes */ |
|---|
| 65 | | - long qt_delbcnt_delta; /* delayed dquot blk count changes */ |
|---|
| 66 | | - long qt_icount_delta; /* dquot inode count changes */ |
|---|
| 67 | | - ulong qt_rtblk_res; /* # blks reserved on a dquot */ |
|---|
| 68 | | - ulong qt_rtblk_res_used;/* # blks used from reservation */ |
|---|
| 69 | | - long qt_rtbcount_delta;/* dquot realtime blk changes */ |
|---|
| 70 | | - long qt_delrtb_delta; /* delayed RT blk count changes */ |
|---|
| 71 | | -} xfs_dqtrx_t; |
|---|
| 62 | + |
|---|
| 63 | + uint64_t qt_blk_res; /* blks reserved on a dquot */ |
|---|
| 64 | + int64_t qt_bcount_delta; /* dquot blk count changes */ |
|---|
| 65 | + int64_t qt_delbcnt_delta; /* delayed dquot blk count changes */ |
|---|
| 66 | + |
|---|
| 67 | + uint64_t qt_rtblk_res; /* # blks reserved on a dquot */ |
|---|
| 68 | + uint64_t qt_rtblk_res_used;/* # blks used from reservation */ |
|---|
| 69 | + int64_t qt_rtbcount_delta;/* dquot realtime blk changes */ |
|---|
| 70 | + int64_t qt_delrtb_delta; /* delayed RT blk count changes */ |
|---|
| 71 | + |
|---|
| 72 | + uint64_t qt_ino_res; /* inode reserved on a dquot */ |
|---|
| 73 | + uint64_t qt_ino_res_used; /* inodes used from the reservation */ |
|---|
| 74 | + int64_t qt_icount_delta; /* dquot inode count changes */ |
|---|
| 75 | +}; |
|---|
| 72 | 76 | |
|---|
| 73 | 77 | #ifdef CONFIG_XFS_QUOTA |
|---|
| 74 | 78 | extern void xfs_trans_dup_dqinfo(struct xfs_trans *, struct xfs_trans *); |
|---|
| 75 | 79 | extern void xfs_trans_free_dqinfo(struct xfs_trans *); |
|---|
| 76 | 80 | extern void xfs_trans_mod_dquot_byino(struct xfs_trans *, struct xfs_inode *, |
|---|
| 77 | | - uint, long); |
|---|
| 81 | + uint, int64_t); |
|---|
| 78 | 82 | extern void xfs_trans_apply_dquot_deltas(struct xfs_trans *); |
|---|
| 79 | 83 | extern void xfs_trans_unreserve_and_mod_dquots(struct xfs_trans *); |
|---|
| 80 | 84 | extern int xfs_trans_reserve_quota_nblks(struct xfs_trans *, |
|---|
| 81 | | - struct xfs_inode *, long, long, uint); |
|---|
| 85 | + struct xfs_inode *, int64_t, long, uint); |
|---|
| 82 | 86 | extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *, |
|---|
| 83 | 87 | struct xfs_mount *, struct xfs_dquot *, |
|---|
| 84 | | - struct xfs_dquot *, struct xfs_dquot *, long, long, uint); |
|---|
| 88 | + struct xfs_dquot *, struct xfs_dquot *, int64_t, long, uint); |
|---|
| 85 | 89 | |
|---|
| 86 | | -extern int xfs_qm_vop_dqalloc(struct xfs_inode *, xfs_dqid_t, xfs_dqid_t, |
|---|
| 90 | +extern int xfs_qm_vop_dqalloc(struct xfs_inode *, kuid_t, kgid_t, |
|---|
| 87 | 91 | prid_t, uint, struct xfs_dquot **, struct xfs_dquot **, |
|---|
| 88 | 92 | struct xfs_dquot **); |
|---|
| 89 | 93 | extern void xfs_qm_vop_create_dqattach(struct xfs_trans *, struct xfs_inode *, |
|---|
| .. | .. |
|---|
| 106 | 110 | |
|---|
| 107 | 111 | #else |
|---|
| 108 | 112 | static inline int |
|---|
| 109 | | -xfs_qm_vop_dqalloc(struct xfs_inode *ip, xfs_dqid_t uid, xfs_dqid_t gid, |
|---|
| 113 | +xfs_qm_vop_dqalloc(struct xfs_inode *ip, kuid_t kuid, kgid_t kgid, |
|---|
| 110 | 114 | prid_t prid, uint flags, struct xfs_dquot **udqp, |
|---|
| 111 | 115 | struct xfs_dquot **gdqp, struct xfs_dquot **pdqp) |
|---|
| 112 | 116 | { |
|---|
| .. | .. |
|---|
| 121 | 125 | #define xfs_trans_apply_dquot_deltas(tp) |
|---|
| 122 | 126 | #define xfs_trans_unreserve_and_mod_dquots(tp) |
|---|
| 123 | 127 | static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp, |
|---|
| 124 | | - struct xfs_inode *ip, long nblks, long ninos, uint flags) |
|---|
| 128 | + struct xfs_inode *ip, int64_t nblks, long ninos, uint flags) |
|---|
| 125 | 129 | { |
|---|
| 126 | 130 | return 0; |
|---|
| 127 | 131 | } |
|---|
| 128 | 132 | static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp, |
|---|
| 129 | 133 | struct xfs_mount *mp, struct xfs_dquot *udqp, |
|---|
| 130 | 134 | struct xfs_dquot *gdqp, struct xfs_dquot *pdqp, |
|---|
| 131 | | - long nblks, long nions, uint flags) |
|---|
| 135 | + int64_t nblks, long nions, uint flags) |
|---|
| 132 | 136 | { |
|---|
| 133 | 137 | return 0; |
|---|
| 134 | 138 | } |
|---|