Reference

Q_XGETQSTAT(2const)

get XFS-specific quota information

NAME

Q_XGETQSTAT - get XFS-specific quota information

LIBRARY

Standard C library (libc, -lc)

SYNOPSIS

#include <xfs/xqm.h>      /* See quotactl(2) */
#include <sys/quota.h>

int quotactl(QCMD(Q_XGETQSTAT, type), const char *_Nullable special, 0, caddr_t addr);

#include <xfs/xqm.h> /* See quotactl_fd(2) */ #include <sys/syscall.h> /* Definition of SYS_* constants */ #include <unistd.h>

int syscall(SYS_quotactl_fd, int fd, QCMD(Q_XGETQSTAT, type), 0, struct fs_quota_stat *addr);

#include <xfs/xqm.h> /* See quotactl(2) */

#define FS_QSTAT_VERSION  1  /* fs_quota_stat.qs_version */
struct fs_quota_stat {
	int8_t    qs_version;
	uint16_t  qs_flags;
	int8_t    qs_pad;
	struct fs_qfilestat  qs_uquota;
	struct fs_qfilestat  qs_gquota;
	uint32_t  qs_incoredqs;
	int32_t   qs_btimelimit;
	int32_t   qs_itimelimit;
	int32_t   qs_rtbtimelimit;
	uint16_t  qs_bwarnlimit;
	uint16_t  qs_iwarnlimit;
};
struct fs_qfilestat {
	uint64_t  qfs_ino;
	uint64_t  qfs_nblks;
	uint32_t  qfs_nextents;
};

DESCRIPTION

Returns XFS filesystem-specific quota information in the fs_quota_stat structure pointed by addr.

This is useful for finding out how much space is used to store quota information, and also to get the quota on/off status of a given local XFS filesystem.

struct fs_quota_stat

.qs_version

Version number for future changes.

.qs_flags

XFS_QUOTA_{U,P,G}DQ_{ACCT,ENFD}

.qs_pad

Unused.

.qs_uquota

User quota storage information.

.qs_gquota

Group quota storage information.

.qs_incoredqs

Number of dquots in core.

.qs_btimelimit

Limit for blocks timer.

.qs_itimelimit

Limit for inodes timer.

.qs_rtbtimelimit

Limit for RT blocks timer.

.qs_bwarnlimit

Limit for # of warnings.

.qs_iwarnlimit

Limit for # of warnings.

struct fs_quota_stat

.qfs_ino

Inode number.

.qfs_nblks

Number of BBs 512-byte-blocks.

.qfs_nextents

Number of extents.

RETURN VALUE

See quotactl(2).

ERRORS

See quotactl(2).

STANDARDS

Linux.

HISTORY

Linux.

SEE ALSO

quotactl(2), quotactl_fd(2), Q_XGETQSTATV(2const)