Loading fs/xfs/libxfs/xfs_dquot_buf.c +4 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ xfs_calc_dquots_per_chunk( xfs_failaddr_t xfs_dquot_verify( struct xfs_mount *mp, xfs_disk_dquot_t *ddq, struct xfs_disk_dquot *ddq, xfs_dqid_t id, uint type) /* used only during quotacheck */ { Loading fs/xfs/libxfs/xfs_format.h +5 −5 Original line number Diff line number Diff line Loading @@ -1144,11 +1144,11 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev) /* * This is the main portion of the on-disk representation of quota * information for a user. This is the q_core of the xfs_dquot_t that * information for a user. This is the q_core of the struct xfs_dquot that * is kept in kernel memory. We pad this with some more expansion room * to construct the on disk structure. */ typedef struct xfs_disk_dquot { struct xfs_disk_dquot { __be16 d_magic; /* dquot magic = XFS_DQUOT_MAGIC */ __u8 d_version; /* dquot version */ __u8 d_flags; /* XFS_DQ_USER/PROJ/GROUP */ Loading @@ -1171,14 +1171,14 @@ typedef struct xfs_disk_dquot { __be32 d_rtbtimer; /* similar to above; for RT disk blocks */ __be16 d_rtbwarns; /* warnings issued wrt RT disk blocks */ __be16 d_pad; } xfs_disk_dquot_t; }; /* * This is what goes on disk. This is separated from the xfs_disk_dquot because * carrying the unnecessary padding would be a waste of memory. */ typedef struct xfs_dqblk { xfs_disk_dquot_t dd_diskdq; /* portion that lives incore as well */ struct xfs_disk_dquot dd_diskdq; /* portion living incore as well */ char dd_fill[4];/* filling for posterity */ /* Loading fs/xfs/libxfs/xfs_trans_resv.c +1 −1 Original line number Diff line number Diff line Loading @@ -718,7 +718,7 @@ xfs_calc_clear_agi_bucket_reservation( /* * Adjusting quota limits. * the xfs_disk_dquot_t: sizeof(struct xfs_disk_dquot) * the disk quota buffer: sizeof(struct xfs_disk_dquot) */ STATIC uint xfs_calc_qm_setqlim_reservation(void) Loading fs/xfs/xfs_dquot.c +9 −9 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static struct lock_class_key xfs_dquot_project_class; */ void xfs_qm_dqdestroy( xfs_dquot_t *dqp) struct xfs_dquot *dqp) { ASSERT(list_empty(&dqp->q_lru)); Loading Loading @@ -113,8 +113,8 @@ xfs_qm_adjust_dqlimits( */ void xfs_qm_adjust_dqtimers( xfs_mount_t *mp, xfs_disk_dquot_t *d) struct xfs_mount *mp, struct xfs_disk_dquot *d) { ASSERT(d->d_id); Loading Loading @@ -497,7 +497,7 @@ xfs_dquot_from_disk( struct xfs_disk_dquot *ddqp = bp->b_addr + dqp->q_bufoffset; /* copy everything from disk dquot to the incore dquot */ memcpy(&dqp->q_core, ddqp, sizeof(xfs_disk_dquot_t)); memcpy(&dqp->q_core, ddqp, sizeof(struct xfs_disk_dquot)); /* * Reservation counters are defined as reservation plus current usage Loading Loading @@ -989,7 +989,7 @@ xfs_qm_dqput( */ void xfs_qm_dqrele( xfs_dquot_t *dqp) struct xfs_dquot *dqp) { if (!dqp) return; Loading Loading @@ -1019,7 +1019,7 @@ xfs_qm_dqflush_done( struct xfs_log_item *lip) { xfs_dq_logitem_t *qip = (struct xfs_dq_logitem *)lip; xfs_dquot_t *dqp = qip->qli_dquot; struct xfs_dquot *dqp = qip->qli_dquot; struct xfs_ail *ailp = lip->li_ailp; /* Loading Loading @@ -1130,7 +1130,7 @@ xfs_qm_dqflush( } /* This is the only portion of data that needs to persist */ memcpy(ddqp, &dqp->q_core, sizeof(xfs_disk_dquot_t)); memcpy(ddqp, &dqp->q_core, sizeof(struct xfs_disk_dquot)); /* * Clear the dirty field and remember the flush lsn for later use. Loading Loading @@ -1188,8 +1188,8 @@ xfs_qm_dqflush( */ void xfs_dqlock2( xfs_dquot_t *d1, xfs_dquot_t *d2) struct xfs_dquot *d1, struct xfs_dquot *d2) { if (d1 && d2) { ASSERT(d1 != d2); Loading fs/xfs/xfs_dquot.h +50 −48 Original line number Diff line number Diff line Loading @@ -30,28 +30,31 @@ enum { /* * The incore dquot structure */ typedef struct xfs_dquot { uint dq_flags; /* various flags (XFS_DQ_*) */ struct list_head q_lru; /* global free list of dquots */ struct xfs_mount*q_mount; /* filesystem this relates to */ uint q_nrefs; /* # active refs from inodes */ xfs_daddr_t q_blkno; /* blkno of dquot buffer */ int q_bufoffset; /* off of dq in buffer (# dquots) */ xfs_fileoff_t q_fileoffset; /* offset in quotas file */ xfs_disk_dquot_t q_core; /* actual usage & quotas */ xfs_dq_logitem_t q_logitem; /* dquot log item */ xfs_qcnt_t q_res_bcount; /* total regular nblks used+reserved */ xfs_qcnt_t q_res_icount; /* total inos allocd+reserved */ xfs_qcnt_t q_res_rtbcount;/* total realtime blks used+reserved */ xfs_qcnt_t q_prealloc_lo_wmark;/* prealloc throttle wmark */ xfs_qcnt_t q_prealloc_hi_wmark;/* prealloc disabled wmark */ struct xfs_dquot { uint dq_flags; struct list_head q_lru; struct xfs_mount *q_mount; uint q_nrefs; xfs_daddr_t q_blkno; int q_bufoffset; xfs_fileoff_t q_fileoffset; struct xfs_disk_dquot q_core; xfs_dq_logitem_t q_logitem; /* total regular nblks used+reserved */ xfs_qcnt_t q_res_bcount; /* total inos allocd+reserved */ xfs_qcnt_t q_res_icount; /* total realtime blks used+reserved */ xfs_qcnt_t q_res_rtbcount; xfs_qcnt_t q_prealloc_lo_wmark; xfs_qcnt_t q_prealloc_hi_wmark; int64_t q_low_space[XFS_QLOWSP_MAX]; struct mutex q_qlock; /* quota lock */ struct completion q_flush; /* flush completion queue */ atomic_t q_pincount; /* dquot pin count */ wait_queue_head_t q_pinwait; /* dquot pinning wait queue */ } xfs_dquot_t; struct mutex q_qlock; struct completion q_flush; atomic_t q_pincount; struct wait_queue_head q_pinwait; }; /* * Lock hierarchy for q_qlock: Loading @@ -68,17 +71,17 @@ enum { * queue synchronizes processes attempting to flush the in-core dquot back to * disk. */ static inline void xfs_dqflock(xfs_dquot_t *dqp) static inline void xfs_dqflock(struct xfs_dquot *dqp) { wait_for_completion(&dqp->q_flush); } static inline bool xfs_dqflock_nowait(xfs_dquot_t *dqp) static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp) { return try_wait_for_completion(&dqp->q_flush); } static inline void xfs_dqfunlock(xfs_dquot_t *dqp) static inline void xfs_dqfunlock(struct xfs_dquot *dqp) { complete(&dqp->q_flush); } Loading Loading @@ -112,7 +115,7 @@ static inline int xfs_this_quota_on(struct xfs_mount *mp, int type) } } static inline xfs_dquot_t *xfs_inode_dquot(struct xfs_inode *ip, int type) static inline struct xfs_dquot *xfs_inode_dquot(struct xfs_inode *ip, int type) { switch (type & XFS_DQ_ALLTYPES) { case XFS_DQ_USER: Loading Loading @@ -147,31 +150,30 @@ static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp) #define XFS_QM_ISPDQ(dqp) ((dqp)->dq_flags & XFS_DQ_PROJ) #define XFS_QM_ISGDQ(dqp) ((dqp)->dq_flags & XFS_DQ_GROUP) extern void xfs_qm_dqdestroy(xfs_dquot_t *); extern int xfs_qm_dqflush(struct xfs_dquot *, struct xfs_buf **); extern void xfs_qm_dqunpin_wait(xfs_dquot_t *); extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, xfs_disk_dquot_t *); extern void xfs_qm_adjust_dqlimits(struct xfs_mount *, struct xfs_dquot *); extern xfs_dqid_t xfs_qm_id_for_quotatype(struct xfs_inode *ip, uint type); extern int xfs_qm_dqget(struct xfs_mount *mp, xfs_dqid_t id, void xfs_qm_dqdestroy(struct xfs_dquot *dqp); int xfs_qm_dqflush(struct xfs_dquot *dqp, struct xfs_buf **bpp); void xfs_qm_dqunpin_wait(struct xfs_dquot *dqp); void xfs_qm_adjust_dqtimers(struct xfs_mount *mp, struct xfs_disk_dquot *d); void xfs_qm_adjust_dqlimits(struct xfs_mount *mp, struct xfs_dquot *d); xfs_dqid_t xfs_qm_id_for_quotatype(struct xfs_inode *ip, uint type); int xfs_qm_dqget(struct xfs_mount *mp, xfs_dqid_t id, uint type, bool can_alloc, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_inode(struct xfs_inode *ip, uint type, int xfs_qm_dqget_inode(struct xfs_inode *ip, uint type, bool can_alloc, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_next(struct xfs_mount *mp, xfs_dqid_t id, int xfs_qm_dqget_next(struct xfs_mount *mp, xfs_dqid_t id, uint type, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_uncached(struct xfs_mount *mp, int xfs_qm_dqget_uncached(struct xfs_mount *mp, xfs_dqid_t id, uint type, struct xfs_dquot **dqpp); extern void xfs_qm_dqput(xfs_dquot_t *); void xfs_qm_dqput(struct xfs_dquot *dqp); extern void xfs_dqlock2(struct xfs_dquot *, struct xfs_dquot *); void xfs_dqlock2(struct xfs_dquot *, struct xfs_dquot *); extern void xfs_dquot_set_prealloc_limits(struct xfs_dquot *); void xfs_dquot_set_prealloc_limits(struct xfs_dquot *); static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) { Loading Loading
fs/xfs/libxfs/xfs_dquot_buf.c +4 −4 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ xfs_calc_dquots_per_chunk( xfs_failaddr_t xfs_dquot_verify( struct xfs_mount *mp, xfs_disk_dquot_t *ddq, struct xfs_disk_dquot *ddq, xfs_dqid_t id, uint type) /* used only during quotacheck */ { Loading
fs/xfs/libxfs/xfs_format.h +5 −5 Original line number Diff line number Diff line Loading @@ -1144,11 +1144,11 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev) /* * This is the main portion of the on-disk representation of quota * information for a user. This is the q_core of the xfs_dquot_t that * information for a user. This is the q_core of the struct xfs_dquot that * is kept in kernel memory. We pad this with some more expansion room * to construct the on disk structure. */ typedef struct xfs_disk_dquot { struct xfs_disk_dquot { __be16 d_magic; /* dquot magic = XFS_DQUOT_MAGIC */ __u8 d_version; /* dquot version */ __u8 d_flags; /* XFS_DQ_USER/PROJ/GROUP */ Loading @@ -1171,14 +1171,14 @@ typedef struct xfs_disk_dquot { __be32 d_rtbtimer; /* similar to above; for RT disk blocks */ __be16 d_rtbwarns; /* warnings issued wrt RT disk blocks */ __be16 d_pad; } xfs_disk_dquot_t; }; /* * This is what goes on disk. This is separated from the xfs_disk_dquot because * carrying the unnecessary padding would be a waste of memory. */ typedef struct xfs_dqblk { xfs_disk_dquot_t dd_diskdq; /* portion that lives incore as well */ struct xfs_disk_dquot dd_diskdq; /* portion living incore as well */ char dd_fill[4];/* filling for posterity */ /* Loading
fs/xfs/libxfs/xfs_trans_resv.c +1 −1 Original line number Diff line number Diff line Loading @@ -718,7 +718,7 @@ xfs_calc_clear_agi_bucket_reservation( /* * Adjusting quota limits. * the xfs_disk_dquot_t: sizeof(struct xfs_disk_dquot) * the disk quota buffer: sizeof(struct xfs_disk_dquot) */ STATIC uint xfs_calc_qm_setqlim_reservation(void) Loading
fs/xfs/xfs_dquot.c +9 −9 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static struct lock_class_key xfs_dquot_project_class; */ void xfs_qm_dqdestroy( xfs_dquot_t *dqp) struct xfs_dquot *dqp) { ASSERT(list_empty(&dqp->q_lru)); Loading Loading @@ -113,8 +113,8 @@ xfs_qm_adjust_dqlimits( */ void xfs_qm_adjust_dqtimers( xfs_mount_t *mp, xfs_disk_dquot_t *d) struct xfs_mount *mp, struct xfs_disk_dquot *d) { ASSERT(d->d_id); Loading Loading @@ -497,7 +497,7 @@ xfs_dquot_from_disk( struct xfs_disk_dquot *ddqp = bp->b_addr + dqp->q_bufoffset; /* copy everything from disk dquot to the incore dquot */ memcpy(&dqp->q_core, ddqp, sizeof(xfs_disk_dquot_t)); memcpy(&dqp->q_core, ddqp, sizeof(struct xfs_disk_dquot)); /* * Reservation counters are defined as reservation plus current usage Loading Loading @@ -989,7 +989,7 @@ xfs_qm_dqput( */ void xfs_qm_dqrele( xfs_dquot_t *dqp) struct xfs_dquot *dqp) { if (!dqp) return; Loading Loading @@ -1019,7 +1019,7 @@ xfs_qm_dqflush_done( struct xfs_log_item *lip) { xfs_dq_logitem_t *qip = (struct xfs_dq_logitem *)lip; xfs_dquot_t *dqp = qip->qli_dquot; struct xfs_dquot *dqp = qip->qli_dquot; struct xfs_ail *ailp = lip->li_ailp; /* Loading Loading @@ -1130,7 +1130,7 @@ xfs_qm_dqflush( } /* This is the only portion of data that needs to persist */ memcpy(ddqp, &dqp->q_core, sizeof(xfs_disk_dquot_t)); memcpy(ddqp, &dqp->q_core, sizeof(struct xfs_disk_dquot)); /* * Clear the dirty field and remember the flush lsn for later use. Loading Loading @@ -1188,8 +1188,8 @@ xfs_qm_dqflush( */ void xfs_dqlock2( xfs_dquot_t *d1, xfs_dquot_t *d2) struct xfs_dquot *d1, struct xfs_dquot *d2) { if (d1 && d2) { ASSERT(d1 != d2); Loading
fs/xfs/xfs_dquot.h +50 −48 Original line number Diff line number Diff line Loading @@ -30,28 +30,31 @@ enum { /* * The incore dquot structure */ typedef struct xfs_dquot { uint dq_flags; /* various flags (XFS_DQ_*) */ struct list_head q_lru; /* global free list of dquots */ struct xfs_mount*q_mount; /* filesystem this relates to */ uint q_nrefs; /* # active refs from inodes */ xfs_daddr_t q_blkno; /* blkno of dquot buffer */ int q_bufoffset; /* off of dq in buffer (# dquots) */ xfs_fileoff_t q_fileoffset; /* offset in quotas file */ xfs_disk_dquot_t q_core; /* actual usage & quotas */ xfs_dq_logitem_t q_logitem; /* dquot log item */ xfs_qcnt_t q_res_bcount; /* total regular nblks used+reserved */ xfs_qcnt_t q_res_icount; /* total inos allocd+reserved */ xfs_qcnt_t q_res_rtbcount;/* total realtime blks used+reserved */ xfs_qcnt_t q_prealloc_lo_wmark;/* prealloc throttle wmark */ xfs_qcnt_t q_prealloc_hi_wmark;/* prealloc disabled wmark */ struct xfs_dquot { uint dq_flags; struct list_head q_lru; struct xfs_mount *q_mount; uint q_nrefs; xfs_daddr_t q_blkno; int q_bufoffset; xfs_fileoff_t q_fileoffset; struct xfs_disk_dquot q_core; xfs_dq_logitem_t q_logitem; /* total regular nblks used+reserved */ xfs_qcnt_t q_res_bcount; /* total inos allocd+reserved */ xfs_qcnt_t q_res_icount; /* total realtime blks used+reserved */ xfs_qcnt_t q_res_rtbcount; xfs_qcnt_t q_prealloc_lo_wmark; xfs_qcnt_t q_prealloc_hi_wmark; int64_t q_low_space[XFS_QLOWSP_MAX]; struct mutex q_qlock; /* quota lock */ struct completion q_flush; /* flush completion queue */ atomic_t q_pincount; /* dquot pin count */ wait_queue_head_t q_pinwait; /* dquot pinning wait queue */ } xfs_dquot_t; struct mutex q_qlock; struct completion q_flush; atomic_t q_pincount; struct wait_queue_head q_pinwait; }; /* * Lock hierarchy for q_qlock: Loading @@ -68,17 +71,17 @@ enum { * queue synchronizes processes attempting to flush the in-core dquot back to * disk. */ static inline void xfs_dqflock(xfs_dquot_t *dqp) static inline void xfs_dqflock(struct xfs_dquot *dqp) { wait_for_completion(&dqp->q_flush); } static inline bool xfs_dqflock_nowait(xfs_dquot_t *dqp) static inline bool xfs_dqflock_nowait(struct xfs_dquot *dqp) { return try_wait_for_completion(&dqp->q_flush); } static inline void xfs_dqfunlock(xfs_dquot_t *dqp) static inline void xfs_dqfunlock(struct xfs_dquot *dqp) { complete(&dqp->q_flush); } Loading Loading @@ -112,7 +115,7 @@ static inline int xfs_this_quota_on(struct xfs_mount *mp, int type) } } static inline xfs_dquot_t *xfs_inode_dquot(struct xfs_inode *ip, int type) static inline struct xfs_dquot *xfs_inode_dquot(struct xfs_inode *ip, int type) { switch (type & XFS_DQ_ALLTYPES) { case XFS_DQ_USER: Loading Loading @@ -147,31 +150,30 @@ static inline bool xfs_dquot_lowsp(struct xfs_dquot *dqp) #define XFS_QM_ISPDQ(dqp) ((dqp)->dq_flags & XFS_DQ_PROJ) #define XFS_QM_ISGDQ(dqp) ((dqp)->dq_flags & XFS_DQ_GROUP) extern void xfs_qm_dqdestroy(xfs_dquot_t *); extern int xfs_qm_dqflush(struct xfs_dquot *, struct xfs_buf **); extern void xfs_qm_dqunpin_wait(xfs_dquot_t *); extern void xfs_qm_adjust_dqtimers(xfs_mount_t *, xfs_disk_dquot_t *); extern void xfs_qm_adjust_dqlimits(struct xfs_mount *, struct xfs_dquot *); extern xfs_dqid_t xfs_qm_id_for_quotatype(struct xfs_inode *ip, uint type); extern int xfs_qm_dqget(struct xfs_mount *mp, xfs_dqid_t id, void xfs_qm_dqdestroy(struct xfs_dquot *dqp); int xfs_qm_dqflush(struct xfs_dquot *dqp, struct xfs_buf **bpp); void xfs_qm_dqunpin_wait(struct xfs_dquot *dqp); void xfs_qm_adjust_dqtimers(struct xfs_mount *mp, struct xfs_disk_dquot *d); void xfs_qm_adjust_dqlimits(struct xfs_mount *mp, struct xfs_dquot *d); xfs_dqid_t xfs_qm_id_for_quotatype(struct xfs_inode *ip, uint type); int xfs_qm_dqget(struct xfs_mount *mp, xfs_dqid_t id, uint type, bool can_alloc, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_inode(struct xfs_inode *ip, uint type, int xfs_qm_dqget_inode(struct xfs_inode *ip, uint type, bool can_alloc, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_next(struct xfs_mount *mp, xfs_dqid_t id, int xfs_qm_dqget_next(struct xfs_mount *mp, xfs_dqid_t id, uint type, struct xfs_dquot **dqpp); extern int xfs_qm_dqget_uncached(struct xfs_mount *mp, int xfs_qm_dqget_uncached(struct xfs_mount *mp, xfs_dqid_t id, uint type, struct xfs_dquot **dqpp); extern void xfs_qm_dqput(xfs_dquot_t *); void xfs_qm_dqput(struct xfs_dquot *dqp); extern void xfs_dqlock2(struct xfs_dquot *, struct xfs_dquot *); void xfs_dqlock2(struct xfs_dquot *, struct xfs_dquot *); extern void xfs_dquot_set_prealloc_limits(struct xfs_dquot *); void xfs_dquot_set_prealloc_limits(struct xfs_dquot *); static inline struct xfs_dquot *xfs_qm_dqhold(struct xfs_dquot *dqp) { Loading