diff options
author | Brian Behlendorf <[email protected]> | 2023-10-23 09:55:36 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-23 09:55:36 -0700 |
commit | e9725abd83166bf190dee859bbf0cefe0abb0a2b (patch) | |
tree | c401b74168bef6d7fc431a7425cd64de329d6ae1 /module | |
parent | b5e6091885c32e9a01df887092061b6ed8642ad0 (diff) |
Revert "Do not persist user/group/project quota zap objects when unneeded"
This reverts commit 797f55ef12d752d2a7fb04fae5d24e019adf2a1d which
was causing a VERIFY failure when running the project quota tests.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #15438
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zfs_quota.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/module/zfs/zfs_quota.c b/module/zfs/zfs_quota.c index 56f9d22ed..9b351eefc 100644 --- a/module/zfs/zfs_quota.c +++ b/module/zfs/zfs_quota.c @@ -347,32 +347,18 @@ zfs_set_userquota(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, if (*objp == 0) { *objp = zap_create(zfsvfs->z_os, DMU_OT_USERGROUP_QUOTA, DMU_OT_NONE, 0, tx); - VERIFY0(zap_add(zfsvfs->z_os, MASTER_NODE_OBJ, + VERIFY(0 == zap_add(zfsvfs->z_os, MASTER_NODE_OBJ, zfs_userquota_prop_prefixes[type], 8, 1, objp, tx)); } + mutex_exit(&zfsvfs->z_lock); if (quota == 0) { err = zap_remove(zfsvfs->z_os, *objp, buf, tx); if (err == ENOENT) err = 0; - /* - * If the quota contains no more entries after the entry - * was removed, destroy the quota zap and remove the - * reference from zfsvfs. This will save us unnecessary - * zap_lookups for the quota during writes. - */ - uint64_t zap_nentries; - VERIFY0(zap_count(zfsvfs->z_os, *objp, &zap_nentries)); - if (zap_nentries == 0) { - VERIFY0(zap_remove(zfsvfs->z_os, MASTER_NODE_OBJ, - zfs_userquota_prop_prefixes[type], tx)); - VERIFY0(zap_destroy(zfsvfs->z_os, *objp, tx)); - *objp = 0; - } } else { err = zap_update(zfsvfs->z_os, *objp, buf, 8, 1, "a, tx); } - mutex_exit(&zfsvfs->z_lock); ASSERT(err == 0); if (fuid_dirtied) zfs_fuid_sync(zfsvfs, tx); |