blob: 2b86a43d7ce2ec943bb0b505db3834f33ed7ca19 [file] [log] [blame]
Dave Chinner0b61f8a2018-06-05 19:42:14 -07001// SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
Nathan Scott4ce31212005-11-02 14:59:41 +11003 * Copyright (c) 2000-2003 Silicon Graphics, Inc.
4 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07005 */
6#ifndef __XFS_DQUOT_ITEM_H__
7#define __XFS_DQUOT_ITEM_H__
8
9struct xfs_dquot;
10struct xfs_trans;
11struct xfs_mount;
12struct xfs_qoff_logitem;
13
Pavel Reichlfd8b81d2019-11-12 17:04:26 -080014struct xfs_dq_logitem {
Pavel Reichld0bdfb12019-11-12 17:04:27 -080015 struct xfs_log_item qli_item; /* common portion */
Pavel Reichlfd8b81d2019-11-12 17:04:26 -080016 struct xfs_dquot *qli_dquot; /* dquot ptr */
Pavel Reichld0bdfb12019-11-12 17:04:27 -080017 xfs_lsn_t qli_flush_lsn; /* lsn at last flush */
Pavel Reichlfd8b81d2019-11-12 17:04:26 -080018};
Linus Torvalds1da177e2005-04-16 15:20:36 -070019
Pavel Reichld0bdfb12019-11-12 17:04:27 -080020struct xfs_qoff_logitem {
21 struct xfs_log_item qql_item; /* common portion */
22 struct xfs_qoff_logitem *qql_start_lip; /* qoff-start logitem, if any */
Christoph Hellwigffda4e82013-12-13 11:34:08 +110023 unsigned int qql_flags;
Pavel Reichld0bdfb12019-11-12 17:04:27 -080024};
Linus Torvalds1da177e2005-04-16 15:20:36 -070025
26
Pavel Reichld0bdfb12019-11-12 17:04:27 -080027void xfs_qm_dquot_logitem_init(struct xfs_dquot *dqp);
28struct xfs_qoff_logitem *xfs_qm_qoff_logitem_init(struct xfs_mount *mp,
29 struct xfs_qoff_logitem *start,
30 uint flags);
Brian Foster854f82b2020-03-16 14:26:09 -070031void xfs_qm_qoff_logitem_relse(struct xfs_qoff_logitem *);
Pavel Reichld0bdfb12019-11-12 17:04:27 -080032struct xfs_qoff_logitem *xfs_trans_get_qoff_item(struct xfs_trans *tp,
33 struct xfs_qoff_logitem *startqoff,
34 uint flags);
35void xfs_trans_log_quotaoff_item(struct xfs_trans *tp,
36 struct xfs_qoff_logitem *qlp);
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
38#endif /* __XFS_DQUOT_ITEM_H__ */