HomeFreeBSD

Do not upgrade userobj accounting for snapshot dataset

Description

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

Details

Provenance
jxiong <jinshan.xiong@gmail.com>Authored on Oct 25 2016, 8:21 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 25 2016, 8:21 PM
Parents
rG6568379eea8f: Fix statechange-led.sh & unnecessary libdevmapper warning
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG16fa68f07d26: Do not upgrade userobj accounting for snapshot dataset (authored by jxiong <jinshan.xiong@gmail.com>).Oct 25 2016, 8:21 PM