Skip to main content

Module quota

Module quota 

Source
Expand description

§Filesystem quota: enabling, disabling, and rescanning quota accounting

Quota accounting tracks disk usage per subvolume via qgroups. It must be explicitly enabled before any qgroup limits or usage data are available. Once enabled, usage numbers are maintained incrementally by the kernel; a rescan rebuilds them from scratch if they become inconsistent.

Quota status (whether quotas are on, which mode, inconsistency flag) is read from sysfs via crate::sysfs::SysfsBtrfs::quota_status.

Structs§

QuotaRescanStatus
Status of an in-progress (or absent) quota rescan.

Functions§

quota_disable
Disable quota accounting on the filesystem referred to by fd.
quota_enable
Enable quota accounting on the filesystem referred to by fd.
quota_rescan
Start a quota rescan on the filesystem referred to by fd.
quota_rescan_status
Query the status of the quota rescan on the filesystem referred to by fd.
quota_rescan_wait
Block until the quota rescan currently running on the filesystem referred to by fd completes. Returns immediately if no rescan is in progress.