diff options
author | Jinshan Xiong <[email protected]> | 2016-10-04 11:46:10 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-10-07 09:45:13 -0700 |
commit | 1de321e6260f5b83eb943b6ce2166a3879f42df4 (patch) | |
tree | 5af1627e1f4b9efc0bf67eff965d480e6d603396 /include/sys/zfs_vfsops.h | |
parent | af322debaa11b22c4fe7b6bc8941e562694eabb2 (diff) |
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 <[email protected]>
Signed-off-by: Johann Lombardi <[email protected]>
Diffstat (limited to 'include/sys/zfs_vfsops.h')
-rw-r--r-- | include/sys/zfs_vfsops.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h index efaefdacc..b59ace5b1 100644 --- a/include/sys/zfs_vfsops.h +++ b/include/sys/zfs_vfsops.h @@ -110,6 +110,8 @@ typedef struct zfs_sb { kmutex_t z_lock; uint64_t z_userquota_obj; uint64_t z_groupquota_obj; + uint64_t z_userobjquota_obj; + uint64_t z_groupobjquota_obj; uint64_t z_replay_eof; /* New end of file - replay only */ sa_attr_type_t *z_attr_table; /* SA attr mapping->id */ uint64_t z_hold_size; /* znode hold array size */ @@ -190,6 +192,8 @@ extern boolean_t zfs_owner_overquota(zfs_sb_t *zsb, struct znode *, boolean_t isgroup); extern boolean_t zfs_fuid_overquota(zfs_sb_t *zsb, boolean_t isgroup, uint64_t fuid); +extern boolean_t zfs_fuid_overobjquota(zfs_sb_t *zsb, boolean_t isgroup, + uint64_t fuid); extern int zfs_set_version(zfs_sb_t *zsb, uint64_t newvers); extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value); |