mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-29 18:24:11 +03:00
Long hold the dataset during upgrade
If the receive or rollback is performed while filesystem is upgrading the objset may be evicted in `dsl_dataset_clone_swap_sync_impl`. This will lead to NULL pointer dereference when upgrade tries to access evicted objset. This commit adds long hold of dataset during whole upgrade process. The receive and rollback will return an EBUSY error until the upgrade is not finished. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arkadiusz Bubała <arkadiusz.bubala@open-e.com> Closes #5295 Closes #6837
This commit is contained in:
committed by
Brian Behlendorf
parent
62df1bc813
commit
c0daec32f8
@@ -834,8 +834,13 @@ zfs_fuid_overobjquota(zfsvfs_t *zfsvfs, boolean_t isgroup, uint64_t fuid)
|
||||
int err;
|
||||
|
||||
if (!dmu_objset_userobjspace_present(zfsvfs->z_os)) {
|
||||
if (dmu_objset_userobjspace_upgradable(zfsvfs->z_os))
|
||||
if (dmu_objset_userobjspace_upgradable(zfsvfs->z_os)) {
|
||||
dsl_pool_config_enter(
|
||||
dmu_objset_pool(zfsvfs->z_os), FTAG);
|
||||
dmu_objset_userobjspace_upgrade(zfsvfs->z_os);
|
||||
dsl_pool_config_exit(
|
||||
dmu_objset_pool(zfsvfs->z_os), FTAG);
|
||||
}
|
||||
return (B_FALSE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user