]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/dmu_objset.c
Long hold the dataset during upgrade
authorArkadiusz Bubała <arkadiusz.bubala@open-e.com>
Fri, 10 Nov 2017 21:37:10 +0000 (22:37 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 10 Nov 2017 21:37:10 +0000 (13:37 -0800)
commitc0daec32f839f687a7b631ea8c292dfb2637478a
treed6a951ff43a7a39e2448a9510c4623f3fc512c0e
parent62df1bc813e6972130fffa91c6999a8e5ef80afd
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
module/zfs/dmu_objset.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_vfsops.c