hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/fs/xfs/xfs_quota.h
....@@ -13,6 +13,7 @@
1313 */
1414
1515 struct xfs_trans;
16
+struct xfs_buf;
1617
1718 /*
1819 * This check is done typically without holding the inode lock;
....@@ -38,14 +39,14 @@
3839
3940 static inline uint
4041 xfs_quota_chkd_flag(
41
- uint dqtype)
42
+ xfs_dqtype_t type)
4243 {
43
- switch (dqtype) {
44
- case XFS_DQ_USER:
44
+ switch (type) {
45
+ case XFS_DQTYPE_USER:
4546 return XFS_UQUOTA_CHKD;
46
- case XFS_DQ_GROUP:
47
+ case XFS_DQTYPE_GROUP:
4748 return XFS_GQUOTA_CHKD;
48
- case XFS_DQ_PROJ:
49
+ case XFS_DQTYPE_PROJ:
4950 return XFS_PQUOTA_CHKD;
5051 default:
5152 return 0;
....@@ -56,34 +57,37 @@
5657 * The structure kept inside the xfs_trans_t keep track of dquot changes
5758 * within a transaction and apply them later.
5859 */
59
-typedef struct xfs_dqtrx {
60
+struct xfs_dqtrx {
6061 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
+};
7276
7377 #ifdef CONFIG_XFS_QUOTA
7478 extern void xfs_trans_dup_dqinfo(struct xfs_trans *, struct xfs_trans *);
7579 extern void xfs_trans_free_dqinfo(struct xfs_trans *);
7680 extern void xfs_trans_mod_dquot_byino(struct xfs_trans *, struct xfs_inode *,
77
- uint, long);
81
+ uint, int64_t);
7882 extern void xfs_trans_apply_dquot_deltas(struct xfs_trans *);
7983 extern void xfs_trans_unreserve_and_mod_dquots(struct xfs_trans *);
8084 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);
8286 extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *,
8387 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);
8589
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,
8791 prid_t, uint, struct xfs_dquot **, struct xfs_dquot **,
8892 struct xfs_dquot **);
8993 extern void xfs_qm_vop_create_dqattach(struct xfs_trans *, struct xfs_inode *,
....@@ -106,7 +110,7 @@
106110
107111 #else
108112 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,
110114 prid_t prid, uint flags, struct xfs_dquot **udqp,
111115 struct xfs_dquot **gdqp, struct xfs_dquot **pdqp)
112116 {
....@@ -121,14 +125,14 @@
121125 #define xfs_trans_apply_dquot_deltas(tp)
122126 #define xfs_trans_unreserve_and_mod_dquots(tp)
123127 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)
125129 {
126130 return 0;
127131 }
128132 static inline int xfs_trans_reserve_quota_bydquots(struct xfs_trans *tp,
129133 struct xfs_mount *mp, struct xfs_dquot *udqp,
130134 struct xfs_dquot *gdqp, struct xfs_dquot *pdqp,
131
- long nblks, long nions, uint flags)
135
+ int64_t nblks, long nions, uint flags)
132136 {
133137 return 0;
134138 }