mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Do not upgrade userobj accounting for snapshot dataset
'zfs recv' could disown a living objset without calling dmu_objset_disown(). This will cause the problem that the objset would be released while the upgrading thread is still running. This patch avoids the problem by checking if a dataset is a snapshot before calling dmu_objset_userobjspace_upgrade(). Snapshots are immutable and therefore it doesn't make sense to update them. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Closes #5295 Closes #5328
This commit is contained in:
parent
6568379eea
commit
16fa68f07d
@ -190,6 +190,7 @@ boolean_t dmu_objset_userobjspace_present(objset_t *os);
|
||||
static inline boolean_t dmu_objset_userobjspace_upgradable(objset_t *os)
|
||||
{
|
||||
return (dmu_objset_type(os) == DMU_OST_ZFS &&
|
||||
!dmu_objset_is_snapshot(os) &&
|
||||
dmu_objset_userobjused_enabled(os) &&
|
||||
!dmu_objset_userobjspace_present(os));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user