]> git.proxmox.com Git - mirror_zfs.git/commit
Do not persist user/group/project quota zap objects when unneeded
authorSam Atkinson <atkinson.samuel.j@gmail.com>
Fri, 20 Oct 2023 21:22:04 +0000 (17:22 -0400)
committerGitHub <noreply@github.com>
Fri, 20 Oct 2023 21:22:04 +0000 (14:22 -0700)
commit797f55ef12d752d2a7fb04fae5d24e019adf2a1d
tree72b465c11daccc794e3927dde2ec5bce1b1ae9c6
parent57b409856265a53f93dd2497e5c046506cf0fc70
Do not persist user/group/project quota zap objects when unneeded

In the zfs_id_over*quota functions, there is a short-circuit to skip
the zap_lookup when the quota zap does not exist. If quotas are never
used in a zpool, then the quota zap will never exist. But if
user/group/project quotas are ever used, the zap objects will be
created and will persist even if the quotas are deleted.

The quota zap_lookup in the write path can become a bottleneck for
write-heavy small I/O workloads. Before this commit, it was not
possible to remove this lookup without creating a new zpool.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Sam Atkinson <samatk@amazon.com>
Closes #14721
module/zfs/zfs_quota.c