mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Add support for user/group dnode accounting & quota
This patch tracks dnode usage for each user/group in the DMU_USER/GROUPUSED_OBJECT ZAPs. ZAP entries dedicated to dnode accounting have the key prefixed with "obj-" followed by the UID/GID in string format (as done for the block accounting). A new SPA feature has been added for dnode accounting as well as a new ZPL version. The SPA feature must be enabled in the pool before upgrading the zfs filesystem. During the zfs version upgrade, a "quotacheck" will be executed by marking all dnode as dirty. ZoL-bug-id: https://github.com/zfsonlinux/zfs/issues/3500 Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
This commit is contained in:
committed by
Brian Behlendorf
parent
af322debaa
commit
1de321e626
@@ -1167,6 +1167,13 @@ spa_activate(spa_t *spa, int mode)
|
||||
*/
|
||||
spa->spa_zvol_taskq = taskq_create("z_zvol", 1, defclsyspri,
|
||||
1, INT_MAX, 0);
|
||||
|
||||
/*
|
||||
* The taskq to upgrade datasets in this pool. Currently used by
|
||||
* feature SPA_FEATURE_USEROBJ_ACCOUNTING.
|
||||
*/
|
||||
spa->spa_upgrade_taskq = taskq_create("z_upgrade", boot_ncpus,
|
||||
defclsyspri, 1, INT_MAX, TASKQ_DYNAMIC);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1190,6 +1197,11 @@ spa_deactivate(spa_t *spa)
|
||||
spa->spa_zvol_taskq = NULL;
|
||||
}
|
||||
|
||||
if (spa->spa_upgrade_taskq) {
|
||||
taskq_destroy(spa->spa_upgrade_taskq);
|
||||
spa->spa_upgrade_taskq = NULL;
|
||||
}
|
||||
|
||||
txg_list_destroy(&spa->spa_vdev_txg_list);
|
||||
|
||||
list_destroy(&spa->spa_config_dirty_list);
|
||||
|
||||
Reference in New Issue
Block a user