Reference

Q_XGETQSTATV(2const)

get XFS-specific quota information

NAME

Q_XGETQSTATV - 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_XGETQSTATV, 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_XGETQSTATV, type), 0, struct fs_quota_statv *addr);

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

#define FS_QSTATV_VERSION1  1
struct fs_quota_statv {
	int8_t    qs_version;
	uint8_t   qs_pad1;
	uint16_t  qs_flags;
	uint32_t  qs_incoredqs;
	struct fs_qfilestatv  qs_uquota;
	struct fs_qfilestatv  qs_gquota;
	struct fs_qfilestatv  qs_pquota;
	int32_t   qs_btimelimit;
	int32_t   qs_itimelimit;
	int32_t   qs_rtbtimelimit;
	uint16_t  qs_bwarnlimit;
	uint16_t  qs_iwarnlimit;
	uint64_t  qs_pad2[8];
};
struct fs_qfilestatv {
	uint64_t  qfs_ino;
	uint64_t  qfs_nblks;
	uint32_t  qfs_nextents;
	uint32_t  qfs_pad;
};

DESCRIPTION

Returns XFS filesystem-specific quota information in the fs_quota_statv pointed to by addr.

This version of the operation (compared to Q_XGETQSTAT(2const)) uses a structure with proper versioning support, along with appropriate layout (all fields are naturally aligned) and padding to avoiding special compat handling; it also provides the ability to get statistics regarding the project quota file.

struct fs_quota_statv

.qs_version

This field should be filled with the version of the structure supported by the callee (for now, only FS_QSTAT_VERSION1 is supported). The kernel will fill the structure in accordance with the version provided.

.qs_pad1

Pad for 16-bit alignment.

.qs_flags

XFS_QUOTA_* flags.

.qs_incoredqs

Number of dquots incore.

.qs_uquota

User quota information.

.qs_gquota

Group quota information.

.qs_pquota

Project quota information.

.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.

.qs_pad2

For future proofing.

struct fs_qfilestatv

.qfs_ino

Inode number.

.qfs_nblks

Number of BBs 512-byte-blocks.

.qfs_nextents

Number of extents.

.qfs_pad

Pad for 8-byte alignment.

RETURN VALUE

See quotactl(2).

ERRORS

See quotactl(2).

STANDARDS

Linux.

HISTORY

Linux.

SEE ALSO

quotactl(2), quotactl_fd(2)