Commit d0bdfb10 authored by Pavel Reichl's avatar Pavel Reichl Committed by Darrick J. Wong

xfs: remove the xfs_qoff_logitem_t typedef

Signed-off-by: default avatarPavel Reichl <preichl@redhat.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
[darrick: fix a comment]
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent fd8b81db
...@@ -742,7 +742,7 @@ xfs_calc_qm_dqalloc_reservation( ...@@ -742,7 +742,7 @@ xfs_calc_qm_dqalloc_reservation(
/* /*
* Turning off quotas. * Turning off quotas.
* the xfs_qoff_logitem_t: sizeof(struct xfs_qoff_logitem) * 2 * the quota off logitems: sizeof(struct xfs_qoff_logitem) * 2
* the superblock for the quota flags: sector size * the superblock for the quota flags: sector size
*/ */
STATIC uint STATIC uint
...@@ -755,7 +755,7 @@ xfs_calc_qm_quotaoff_reservation( ...@@ -755,7 +755,7 @@ xfs_calc_qm_quotaoff_reservation(
/* /*
* End of turning off quotas. * End of turning off quotas.
* the xfs_qoff_logitem_t: sizeof(struct xfs_qoff_logitem) * 2 * the quota off logitems: sizeof(struct xfs_qoff_logitem) * 2
*/ */
STATIC uint STATIC uint
xfs_calc_qm_quotaoff_end_reservation(void) xfs_calc_qm_quotaoff_end_reservation(void)
......
...@@ -12,24 +12,26 @@ struct xfs_mount; ...@@ -12,24 +12,26 @@ struct xfs_mount;
struct xfs_qoff_logitem; struct xfs_qoff_logitem;
struct xfs_dq_logitem { struct xfs_dq_logitem {
struct xfs_log_item qli_item; /* common portion */ struct xfs_log_item qli_item; /* common portion */
struct xfs_dquot *qli_dquot; /* dquot ptr */ struct xfs_dquot *qli_dquot; /* dquot ptr */
xfs_lsn_t qli_flush_lsn; /* lsn at last flush */ xfs_lsn_t qli_flush_lsn; /* lsn at last flush */
}; };
typedef struct xfs_qoff_logitem { struct xfs_qoff_logitem {
struct xfs_log_item qql_item; /* common portion */ struct xfs_log_item qql_item; /* common portion */
struct xfs_qoff_logitem *qql_start_lip; /* qoff-start logitem, if any */ struct xfs_qoff_logitem *qql_start_lip; /* qoff-start logitem, if any */
unsigned int qql_flags; unsigned int qql_flags;
} xfs_qoff_logitem_t; };
extern void xfs_qm_dquot_logitem_init(struct xfs_dquot *); void xfs_qm_dquot_logitem_init(struct xfs_dquot *dqp);
extern xfs_qoff_logitem_t *xfs_qm_qoff_logitem_init(struct xfs_mount *, struct xfs_qoff_logitem *xfs_qm_qoff_logitem_init(struct xfs_mount *mp,
struct xfs_qoff_logitem *, uint); struct xfs_qoff_logitem *start,
extern xfs_qoff_logitem_t *xfs_trans_get_qoff_item(struct xfs_trans *, uint flags);
struct xfs_qoff_logitem *, uint); struct xfs_qoff_logitem *xfs_trans_get_qoff_item(struct xfs_trans *tp,
extern void xfs_trans_log_quotaoff_item(struct xfs_trans *, struct xfs_qoff_logitem *startqoff,
struct xfs_qoff_logitem *); uint flags);
void xfs_trans_log_quotaoff_item(struct xfs_trans *tp,
struct xfs_qoff_logitem *qlp);
#endif /* __XFS_DQUOT_ITEM_H__ */ #endif /* __XFS_DQUOT_ITEM_H__ */
...@@ -19,9 +19,12 @@ ...@@ -19,9 +19,12 @@
#include "xfs_qm.h" #include "xfs_qm.h"
#include "xfs_icache.h" #include "xfs_icache.h"
STATIC int xfs_qm_log_quotaoff(xfs_mount_t *, xfs_qoff_logitem_t **, uint); STATIC int xfs_qm_log_quotaoff(struct xfs_mount *mp,
STATIC int xfs_qm_log_quotaoff_end(xfs_mount_t *, xfs_qoff_logitem_t *, struct xfs_qoff_logitem **qoffstartp,
uint); uint flags);
STATIC int xfs_qm_log_quotaoff_end(struct xfs_mount *mp,
struct xfs_qoff_logitem *startqoff,
uint flags);
/* /*
* Turn off quota accounting and/or enforcement for all udquots and/or * Turn off quota accounting and/or enforcement for all udquots and/or
...@@ -40,7 +43,7 @@ xfs_qm_scall_quotaoff( ...@@ -40,7 +43,7 @@ xfs_qm_scall_quotaoff(
uint dqtype; uint dqtype;
int error; int error;
uint inactivate_flags; uint inactivate_flags;
xfs_qoff_logitem_t *qoffstart; struct xfs_qoff_logitem *qoffstart;
/* /*
* No file system can have quotas enabled on disk but not in core. * No file system can have quotas enabled on disk but not in core.
...@@ -540,13 +543,13 @@ xfs_qm_scall_setqlim( ...@@ -540,13 +543,13 @@ xfs_qm_scall_setqlim(
STATIC int STATIC int
xfs_qm_log_quotaoff_end( xfs_qm_log_quotaoff_end(
xfs_mount_t *mp, struct xfs_mount *mp,
xfs_qoff_logitem_t *startqoff, struct xfs_qoff_logitem *startqoff,
uint flags) uint flags)
{ {
xfs_trans_t *tp; struct xfs_trans *tp;
int error; int error;
xfs_qoff_logitem_t *qoffi; struct xfs_qoff_logitem *qoffi;
error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_equotaoff, 0, 0, 0, &tp); error = xfs_trans_alloc(mp, &M_RES(mp)->tr_qm_equotaoff, 0, 0, 0, &tp);
if (error) if (error)
...@@ -568,13 +571,13 @@ xfs_qm_log_quotaoff_end( ...@@ -568,13 +571,13 @@ xfs_qm_log_quotaoff_end(
STATIC int STATIC int
xfs_qm_log_quotaoff( xfs_qm_log_quotaoff(
xfs_mount_t *mp, struct xfs_mount *mp,
xfs_qoff_logitem_t **qoffstartp, struct xfs_qoff_logitem **qoffstartp,
uint flags) uint flags)
{ {
xfs_trans_t *tp; struct xfs_trans *tp;
int error; int error;
xfs_qoff_logitem_t *qoffi; struct xfs_qoff_logitem *qoffi;
*qoffstartp = NULL; *qoffstartp = NULL;
......
...@@ -824,13 +824,13 @@ xfs_trans_reserve_quota_nblks( ...@@ -824,13 +824,13 @@ xfs_trans_reserve_quota_nblks(
/* /*
* This routine is called to allocate a quotaoff log item. * This routine is called to allocate a quotaoff log item.
*/ */
xfs_qoff_logitem_t * struct xfs_qoff_logitem *
xfs_trans_get_qoff_item( xfs_trans_get_qoff_item(
xfs_trans_t *tp, struct xfs_trans *tp,
xfs_qoff_logitem_t *startqoff, struct xfs_qoff_logitem *startqoff,
uint flags) uint flags)
{ {
xfs_qoff_logitem_t *q; struct xfs_qoff_logitem *q;
ASSERT(tp != NULL); ASSERT(tp != NULL);
...@@ -852,8 +852,8 @@ xfs_trans_get_qoff_item( ...@@ -852,8 +852,8 @@ xfs_trans_get_qoff_item(
*/ */
void void
xfs_trans_log_quotaoff_item( xfs_trans_log_quotaoff_item(
xfs_trans_t *tp, struct xfs_trans *tp,
xfs_qoff_logitem_t *qlp) struct xfs_qoff_logitem *qlp)
{ {
tp->t_flags |= XFS_TRANS_DIRTY; tp->t_flags |= XFS_TRANS_DIRTY;
set_bit(XFS_LI_DIRTY, &qlp->qql_item.li_flags); set_bit(XFS_LI_DIRTY, &qlp->qql_item.li_flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment