xref: /OK3568_Linux_fs/kernel/fs/xfs/xfs_dquot_item.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (c) 2000-2003 Silicon Graphics, Inc.
4*4882a593Smuzhiyun  * All Rights Reserved.
5*4882a593Smuzhiyun  */
6*4882a593Smuzhiyun #ifndef __XFS_DQUOT_ITEM_H__
7*4882a593Smuzhiyun #define __XFS_DQUOT_ITEM_H__
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun struct xfs_dquot;
10*4882a593Smuzhiyun struct xfs_trans;
11*4882a593Smuzhiyun struct xfs_mount;
12*4882a593Smuzhiyun struct xfs_qoff_logitem;
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun struct xfs_dq_logitem {
15*4882a593Smuzhiyun 	struct xfs_log_item	qli_item;	/* common portion */
16*4882a593Smuzhiyun 	struct xfs_dquot	*qli_dquot;	/* dquot ptr */
17*4882a593Smuzhiyun 	xfs_lsn_t		qli_flush_lsn;	/* lsn at last flush */
18*4882a593Smuzhiyun };
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun struct xfs_qoff_logitem {
21*4882a593Smuzhiyun 	struct xfs_log_item	qql_item;	/* common portion */
22*4882a593Smuzhiyun 	struct xfs_qoff_logitem *qql_start_lip;	/* qoff-start logitem, if any */
23*4882a593Smuzhiyun 	unsigned int		qql_flags;
24*4882a593Smuzhiyun };
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun void xfs_qm_dquot_logitem_init(struct xfs_dquot *dqp);
28*4882a593Smuzhiyun struct xfs_qoff_logitem	*xfs_qm_qoff_logitem_init(struct xfs_mount *mp,
29*4882a593Smuzhiyun 		struct xfs_qoff_logitem *start,
30*4882a593Smuzhiyun 		uint flags);
31*4882a593Smuzhiyun void xfs_qm_qoff_logitem_relse(struct xfs_qoff_logitem *);
32*4882a593Smuzhiyun struct xfs_qoff_logitem	*xfs_trans_get_qoff_item(struct xfs_trans *tp,
33*4882a593Smuzhiyun 		struct xfs_qoff_logitem *startqoff,
34*4882a593Smuzhiyun 		uint flags);
35*4882a593Smuzhiyun void xfs_trans_log_quotaoff_item(struct xfs_trans *tp,
36*4882a593Smuzhiyun 		struct xfs_qoff_logitem *qlp);
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #endif	/* __XFS_DQUOT_ITEM_H__ */
39