Lines Matching defs:dqp
109 static inline void xfs_dqflock(struct xfs_dquot *dqp)
111 wait_for_completion(&dqp->q_flush);
114 static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp)
116 return try_wait_for_completion(&dqp->q_flush);
119 static inline void xfs_dqfunlock(struct xfs_dquot *dqp)
121 complete(&dqp->q_flush);
124 static inline int xfs_dqlock_nowait(struct xfs_dquot *dqp)
126 return mutex_trylock(&dqp->q_qlock);
129 static inline void xfs_dqlock(struct xfs_dquot *dqp)
131 mutex_lock(&dqp->q_qlock);
134 static inline void xfs_dqunlock(struct xfs_dquot *dqp)
136 mutex_unlock(&dqp->q_qlock);
140 xfs_dquot_type(const struct xfs_dquot *dqp)
142 return dqp->q_type & XFS_DQTYPE_REC_MASK;
181 const struct xfs_dquot *dqp)
183 switch (xfs_dquot_type(dqp)) {
185 return XFS_IS_UQUOTA_ENFORCED(dqp->q_mount);
187 return XFS_IS_GQUOTA_ENFORCED(dqp->q_mount);
189 return XFS_IS_PQUOTA_ENFORCED(dqp->q_mount);
199 static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp)
203 freesp = dqp->q_blk.hardlimit - dqp->q_blk.reserved;
204 if (freesp < dqp->q_blk_prealloc.q_low_space[XFS_QLOWSP_1_PCNT])
207 freesp = dqp->q_rtb.hardlimit - dqp->q_rtb.reserved;
208 if (freesp < dqp->q_rtb_prealloc.q_low_space[XFS_QLOWSP_1_PCNT])
214 void xfs_dquot_to_disk(struct xfs_disk_dquot *ddqp, struct xfs_dquot *dqp);
216 #define XFS_DQ_IS_LOCKED(dqp) (mutex_is_locked(&((dqp)->q_qlock)))
217 #define XFS_DQ_IS_DIRTY(dqp) ((dqp)->q_flags & XFS_DQFLAG_DIRTY)
219 void xfs_qm_dqdestroy(struct xfs_dquot *dqp);
220 int xfs_qm_dqflush(struct xfs_dquot *dqp, struct xfs_buf *bp);
221 void xfs_qm_dqunpin_wait(struct xfs_dquot *dqp);
236 void xfs_qm_dqput(struct xfs_dquot *dqp);
243 int xfs_dquot_attach_buf(struct xfs_trans *tp, struct xfs_dquot *dqp);
244 int xfs_dquot_use_attached_buf(struct xfs_dquot *dqp, struct xfs_buf **bpp);
245 void xfs_dquot_detach_buf(struct xfs_dquot *dqp);
247 static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp)
249 xfs_dqlock(dqp);
250 dqp->q_nrefs++;
251 xfs_dqunlock(dqp);
252 return dqp;