]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu_objset.c
Add support for user/group dnode accounting & quota
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 4 Oct 2016 18:46:10 +0000 (11:46 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 7 Oct 2016 16:45:13 +0000 (09:45 -0700)
commit1de321e6260f5b83eb943b6ce2166a3879f42df4
tree5af1627e1f4b9efc0bf67eff965d480e6d603396
parentaf322debaa11b22c4fe7b6bc8941e562694eabb2
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>
43 files changed:
cmd/zdb/zdb.c
cmd/zfs/zfs_main.c
configure.ac
include/sys/dmu.h
include/sys/dmu_objset.h
include/sys/dnode.h
include/sys/dsl_deleg.h
include/sys/fs/zfs.h
include/sys/spa_impl.h
include/sys/zfs_vfsops.h
include/zfeature_common.h
include/zfs_deleg.h
lib/libzfs/libzfs_dataset.c
man/man5/zpool-features.5
man/man8/zfs.8
module/zcommon/zfs_deleg.c
module/zcommon/zfs_prop.c
module/zfs/dmu_objset.c
module/zfs/dnode_sync.c
module/zfs/spa.c
module/zfs/zfeature_common.c
module/zfs/zfs_acl.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c
tests/runfiles/linux.run
tests/zfs-tests/cmd/mkfiles/mkfiles.c
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_get/zpool_get.cfg
tests/zfs-tests/tests/functional/redundancy/redundancy.kshlib
tests/zfs-tests/tests/functional/upgrade/Makefile.am [new file with mode: 0644]
tests/zfs-tests/tests/functional/upgrade/cleanup.ksh [new file with mode: 0644]
tests/zfs-tests/tests/functional/upgrade/setup.ksh [new file with mode: 0644]
tests/zfs-tests/tests/functional/upgrade/upgrade_userobj_001_pos.ksh [new file with mode: 0644]
tests/zfs-tests/tests/functional/userquota/Makefile.am
tests/zfs-tests/tests/functional/userquota/groupspace_003_pos.ksh [new file with mode: 0644]
tests/zfs-tests/tests/functional/userquota/userquota_001_pos.ksh
tests/zfs-tests/tests/functional/userquota/userquota_004_pos.ksh
tests/zfs-tests/tests/functional/userquota/userquota_010_pos.ksh
tests/zfs-tests/tests/functional/userquota/userquota_013_pos.ksh [new file with mode: 0644]
tests/zfs-tests/tests/functional/userquota/userquota_common.kshlib
tests/zfs-tests/tests/functional/userquota/userspace_002_pos.ksh
tests/zfs-tests/tests/functional/userquota/userspace_003_pos.ksh [new file with mode: 0644]