mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +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
@@ -2857,3 +2857,29 @@ function block_device_wait
|
||||
$UDEVADM settle
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Synchronize all the data in pool
|
||||
#
|
||||
# $1 pool name
|
||||
#
|
||||
function sync_pool #pool
|
||||
{
|
||||
typeset pool=${1:-$TESTPOOL}
|
||||
|
||||
log_must $SYNC
|
||||
log_must $SLEEP 2
|
||||
# Flush all the pool data.
|
||||
typeset -i ret
|
||||
$ZPOOL scrub $pool >/dev/null 2>&1
|
||||
ret=$?
|
||||
(( $ret != 0 )) && \
|
||||
log_fail "$ZPOOL scrub $pool failed."
|
||||
|
||||
while ! is_pool_scrubbed $pool; do
|
||||
if is_pool_resilvered $pool ; then
|
||||
log_fail "$pool should not be resilver completed."
|
||||
fi
|
||||
log_must $SLEEP 2
|
||||
done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user