aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log_format.h')
-rw-r--r--fs/xfs/xfs_log_format.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_format.h b/fs/xfs/xfs_log_format.h
index d1e93d38bd39..5963ec73a95a 100644
--- a/fs/xfs/xfs_log_format.h
+++ b/fs/xfs/xfs_log_format.h
@@ -544,4 +544,62 @@ typedef struct xfs_efd_log_format_64 {
544 xfs_extent_64_t efd_extents[1]; /* array of extents freed */ 544 xfs_extent_64_t efd_extents[1]; /* array of extents freed */
545} xfs_efd_log_format_64_t; 545} xfs_efd_log_format_64_t;
546 546
547/*
548 * Dquot Log format definitions.
549 *
550 * The first two fields must be the type and size fitting into
551 * 32 bits : log_recovery code assumes that.
552 */
553typedef struct xfs_dq_logformat {
554 __uint16_t qlf_type; /* dquot log item type */
555 __uint16_t qlf_size; /* size of this item */
556 xfs_dqid_t qlf_id; /* usr/grp/proj id : 32 bits */
557 __int64_t qlf_blkno; /* blkno of dquot buffer */
558 __int32_t qlf_len; /* len of dquot buffer */
559 __uint32_t qlf_boffset; /* off of dquot in buffer */
560} xfs_dq_logformat_t;
561
562/*
563 * log format struct for QUOTAOFF records.
564 * The first two fields must be the type and size fitting into
565 * 32 bits : log_recovery code assumes that.
566 * We write two LI_QUOTAOFF logitems per quotaoff, the last one keeps a pointer
567 * to the first and ensures that the first logitem is taken out of the AIL
568 * only when the last one is securely committed.
569 */
570typedef struct xfs_qoff_logformat {
571 unsigned short qf_type; /* quotaoff log item type */
572 unsigned short qf_size; /* size of this item */
573 unsigned int qf_flags; /* USR and/or GRP */
574 char qf_pad[12]; /* padding for future */
575} xfs_qoff_logformat_t;
576
577
578/*
579 * Disk quotas status in m_qflags, and also sb_qflags. 16 bits.
580 */
581#define XFS_UQUOTA_ACCT 0x0001 /* user quota accounting ON */
582#define XFS_UQUOTA_ENFD 0x0002 /* user quota limits enforced */
583#define XFS_UQUOTA_CHKD 0x0004 /* quotacheck run on usr quotas */
584#define XFS_PQUOTA_ACCT 0x0008 /* project quota accounting ON */
585#define XFS_OQUOTA_ENFD 0x0010 /* other (grp/prj) quota limits enforced */
586#define XFS_OQUOTA_CHKD 0x0020 /* quotacheck run on other (grp/prj) quotas */
587#define XFS_GQUOTA_ACCT 0x0040 /* group quota accounting ON */
588
589/*
590 * Conversion to and from the combined OQUOTA flag (if necessary)
591 * is done only in xfs_sb_qflags_to_disk() and xfs_sb_qflags_from_disk()
592 */
593#define XFS_GQUOTA_ENFD 0x0080 /* group quota limits enforced */
594#define XFS_GQUOTA_CHKD 0x0100 /* quotacheck run on group quotas */
595#define XFS_PQUOTA_ENFD 0x0200 /* project quota limits enforced */
596#define XFS_PQUOTA_CHKD 0x0400 /* quotacheck run on project quotas */
597
598#define XFS_ALL_QUOTA_ACCT \
599 (XFS_UQUOTA_ACCT | XFS_GQUOTA_ACCT | XFS_PQUOTA_ACCT)
600#define XFS_ALL_QUOTA_ENFD \
601 (XFS_UQUOTA_ENFD | XFS_GQUOTA_ENFD | XFS_PQUOTA_ENFD)
602#define XFS_ALL_QUOTA_CHKD \
603 (XFS_UQUOTA_CHKD | XFS_GQUOTA_CHKD | XFS_PQUOTA_CHKD)
604
547#endif /* __XFS_LOG_FORMAT_H__ */ 605#endif /* __XFS_LOG_FORMAT_H__ */